/*
 @license
 Shaka Player
 Copyright 2016 Google LLC
 SPDX-License-Identifier: Apache-2.0
*/
(function(){var innerGlobal=typeof window!="undefined"?window:global;var exportTo={};(function(window,global,module){/*

 Copyright The Closure Library Authors.
 SPDX-License-Identifier: Apache-2.0
*/
var p,aa=typeof Object.create=="function"?Object.create:function(a){function b(){}b.prototype=a;return new b},ca=typeof Object.defineProperties=="function"?Object.defineProperty:function(a,b,c){if(a==Array.prototype||a==Object.prototype)return a;a[b]=c.value;return a};
function da(a){a=["object"==typeof globalThis&&globalThis,a,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var b=0;b<a.length;++b){var c=a[b];if(c&&c.Math==Math)return c}throw Error("Cannot find global object");}var ea=da(this);function fa(a,b){if(b)a:{var c=ea;a=a.split(".");for(var d=0;d<a.length-1;d++){var e=a[d];if(!(e in c))break a;c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&b!=null&&ca(c,a,{configurable:!0,writable:!0,value:b})}}var ha;
if(typeof Object.setPrototypeOf=="function")ha=Object.setPrototypeOf;else{var ia;a:{var ja={a:!0},ka={};try{ka.__proto__=ja;ia=ka.a;break a}catch(a){}ia=!1}ha=ia?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var la=ha;
function ma(a,b){a.prototype=aa(b.prototype);a.prototype.constructor=a;if(la)la(a,b);else for(var c in b)if(c!="prototype")if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.yo=b.prototype}function na(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}}
function u(a){var b=typeof Symbol!="undefined"&&Symbol.iterator&&a[Symbol.iterator];if(b)return b.call(a);if(typeof a.length=="number")return{next:na(a)};throw Error(String(a)+" is not an iterable or ArrayLike");}function x(a){if(!(a instanceof Array)){a=u(a);for(var b,c=[];!(b=a.next()).done;)c.push(b.value);a=c}return a}
fa("Symbol",function(a){function b(f){if(this instanceof b)throw new TypeError("Symbol is not a constructor");return new c(d+(f||"")+"_"+e++,f)}function c(f,g){this.g=f;ca(this,"description",{configurable:!0,writable:!0,value:g})}if(a)return a;c.prototype.toString=function(){return this.g};var d="jscomp_symbol_"+(Math.random()*1E9>>>0)+"_",e=0;return b});
fa("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");for(var b="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),c=0;c<b.length;c++){var d=ea[b[c]];typeof d==="function"&&typeof d.prototype[a]!="function"&&ca(d.prototype,a,{configurable:!0,writable:!0,value:function(){return oa(na(this))}})}return a});function oa(a){a={next:a};a[Symbol.iterator]=function(){return this};return a}
function pa(){this.u=!1;this.l=null;this.h=void 0;this.g=1;this.j=this.m=0;this.C=this.i=null}function qa(a){if(a.u)throw new TypeError("Generator is already running");a.u=!0}pa.prototype.A=function(a){this.h=a};function ra(a,b){a.i={Ui:b,jj:!0};a.g=a.m||a.j}pa.prototype.return=function(a){this.i={return:a};this.g=this.j};function E(a,b,c){a.g=c;return{value:b}}pa.prototype.B=function(a){this.g=a};function H(a){a.g=0}function sa(a,b,c){a.m=b;c!=void 0&&(a.j=c)}function ta(a,b){a.m=0;a.j=b||0}
function ua(a,b,c){a.g=b;a.m=c||0}function va(a,b){a.m=b||0;b=a.i.Ui;a.i=null;return b}function ya(a){a.C=[a.i];a.m=0;a.j=0}function za(a,b){var c=a.C.splice(0)[0];(c=a.i=a.i||c)?c.jj?a.g=a.m||a.j:c.B!=void 0&&a.j<c.B?(a.g=c.B,a.i=null):a.g=a.j:a.g=b}function Aa(a){this.g=new pa;this.h=a}function Da(a,b){qa(a.g);var c=a.g.l;if(c)return Ea(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.g.return);a.g.return(b);return Ga(a)}
function Ea(a,b,c,d){try{var e=b.call(a.g.l,c);if(!(e instanceof Object))throw new TypeError("Iterator result "+e+" is not an object");if(!e.done)return a.g.u=!1,e;var f=e.value}catch(g){return a.g.l=null,ra(a.g,g),Ga(a)}a.g.l=null;d.call(a.g,f);return Ga(a)}function Ga(a){for(;a.g.g;)try{var b=a.h(a.g);if(b)return a.g.u=!1,{value:b.value,done:!1}}catch(c){a.g.h=void 0,ra(a.g,c)}a.g.u=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.jj)throw b.Ui;return{value:b.return,done:!0}}return{value:void 0,done:!0}}
function Ja(a){this.next=function(b){qa(a.g);a.g.l?b=Ea(a,a.g.l.next,b,a.g.A):(a.g.A(b),b=Ga(a));return b};this.throw=function(b){qa(a.g);a.g.l?b=Ea(a,a.g.l["throw"],b,a.g.A):(ra(a.g,b),b=Ga(a));return b};this.return=function(b){return Da(a,b)};this[Symbol.iterator]=function(){return this}}function Ka(a){function b(d){return a.next(d)}function c(d){return a.throw(d)}return new Promise(function(d,e){function f(g){g.done?d(g.value):Promise.resolve(g.value).then(b,c).then(f,e)}f(a.next())})}
function Q(a){return Ka(new Ja(new Aa(a)))}function Na(){for(var a=Number(this),b=[],c=a;c<arguments.length;c++)b[c-a]=arguments[c];return b}
fa("Promise",function(a){function b(g){this.h=0;this.i=void 0;this.g=[];this.u=!1;var h=this.j();try{g(h.resolve,h.reject)}catch(k){h.reject(k)}}function c(){this.g=null}function d(g){return g instanceof b?g:new b(function(h){h(g)})}if(a)return a;c.prototype.h=function(g){if(this.g==null){this.g=[];var h=this;this.i(function(){h.l()})}this.g.push(g)};var e=ea.setTimeout;c.prototype.i=function(g){e(g,0)};c.prototype.l=function(){for(;this.g&&this.g.length;){var g=this.g;this.g=[];for(var h=0;h<g.length;++h){var k=
g[h];g[h]=null;try{k()}catch(l){this.j(l)}}}this.g=null};c.prototype.j=function(g){this.i(function(){throw g;})};b.prototype.j=function(){function g(l){return function(m){k||(k=!0,l.call(h,m))}}var h=this,k=!1;return{resolve:g(this.G),reject:g(this.l)}};b.prototype.G=function(g){if(g===this)this.l(new TypeError("A Promise cannot resolve to itself"));else if(g instanceof b)this.I(g);else{a:switch(typeof g){case "object":var h=g!=null;break a;case "function":h=!0;break a;default:h=!1}h?this.F(g):this.m(g)}};
b.prototype.F=function(g){var h=void 0;try{h=g.then}catch(k){this.l(k);return}typeof h=="function"?this.J(h,g):this.m(g)};b.prototype.l=function(g){this.A(2,g)};b.prototype.m=function(g){this.A(1,g)};b.prototype.A=function(g,h){if(this.h!=0)throw Error("Cannot settle("+g+", "+h+"): Promise already settled in state"+this.h);this.h=g;this.i=h;this.h===2&&this.H();this.C()};b.prototype.H=function(){var g=this;e(function(){if(g.D()){var h=ea.console;typeof h!=="undefined"&&h.error(g.i)}},1)};b.prototype.D=
function(){if(this.u)return!1;var g=ea.CustomEvent,h=ea.Event,k=ea.dispatchEvent;if(typeof k==="undefined")return!0;typeof g==="function"?g=new g("unhandledrejection",{cancelable:!0}):typeof h==="function"?g=new h("unhandledrejection",{cancelable:!0}):(g=ea.document.createEvent("CustomEvent"),g.initCustomEvent("unhandledrejection",!1,!0,g));g.promise=this;g.reason=this.i;return k(g)};b.prototype.C=function(){if(this.g!=null){for(var g=0;g<this.g.length;++g)f.h(this.g[g]);this.g=null}};var f=new c;
b.prototype.I=function(g){var h=this.j();g.mf(h.resolve,h.reject)};b.prototype.J=function(g,h){var k=this.j();try{g.call(h,k.resolve,k.reject)}catch(l){k.reject(l)}};b.prototype.then=function(g,h){function k(q,r){return typeof q=="function"?function(t){try{l(q(t))}catch(v){m(v)}}:r}var l,m,n=new b(function(q,r){l=q;m=r});this.mf(k(g,l),k(h,m));return n};b.prototype.catch=function(g){return this.then(void 0,g)};b.prototype.mf=function(g,h){function k(){switch(l.h){case 1:g(l.i);break;case 2:h(l.i);
break;default:throw Error("Unexpected state: "+l.h);}}var l=this;this.g==null?f.h(k):this.g.push(k);this.u=!0};b.resolve=d;b.reject=function(g){return new b(function(h,k){k(g)})};b.race=function(g){return new b(function(h,k){for(var l=u(g),m=l.next();!m.done;m=l.next())d(m.value).mf(h,k)})};b.all=function(g){var h=u(g),k=h.next();return k.done?d([]):new b(function(l,m){function n(t){return function(v){q[t]=v;r--;r==0&&l(q)}}var q=[],r=0;do q.push(void 0),r++,d(k.value).mf(n(q.length-1),m),k=h.next();
while(!k.done)})};return b});function Pa(a,b){return Object.prototype.hasOwnProperty.call(a,b)}
fa("WeakMap",function(a){function b(k){this.g=(h+=Math.random()+1).toString();if(k){k=u(k);for(var l;!(l=k.next()).done;)l=l.value,this.set(l[0],l[1])}}function c(){}function d(k){var l=typeof k;return l==="object"&&k!==null||l==="function"}function e(k){if(!Pa(k,g)){var l=new c;ca(k,g,{value:l})}}function f(k){var l=Object[k];l&&(Object[k]=function(m){if(m instanceof c)return m;Object.isExtensible(m)&&e(m);return l(m)})}if(function(){if(!a||!Object.seal)return!1;try{var k=Object.seal({}),l=Object.seal({}),
m=new a([[k,2],[l,3]]);if(m.get(k)!=2||m.get(l)!=3)return!1;m.delete(k);m.set(l,4);return!m.has(k)&&m.get(l)==4}catch(n){return!1}}())return a;var g="$jscomp_hidden_"+Math.random();f("freeze");f("preventExtensions");f("seal");var h=0;b.prototype.set=function(k,l){if(!d(k))throw Error("Invalid WeakMap key");e(k);if(!Pa(k,g))throw Error("WeakMap key fail: "+k);k[g][this.g]=l;return this};b.prototype.get=function(k){return d(k)&&Pa(k,g)?k[g][this.g]:void 0};b.prototype.has=function(k){return d(k)&&Pa(k,
g)&&Pa(k[g],this.g)};b.prototype.delete=function(k){return d(k)&&Pa(k,g)&&Pa(k[g],this.g)?delete k[g][this.g]:!1};return b});
fa("Map",function(a){function b(){var h={};return h.Ic=h.next=h.head=h}function c(h,k){var l=h[1];return oa(function(){if(l){for(;l.head!=h[1];)l=l.Ic;for(;l.next!=l.head;)return l=l.next,{done:!1,value:k(l)};l=null}return{done:!0,value:void 0}})}function d(h,k){var l=k&&typeof k;l=="object"||l=="function"?f.has(k)?l=f.get(k):(l=""+ ++g,f.set(k,l)):l="p_"+k;var m=h[0][l];if(m&&Pa(h[0],l))for(h=0;h<m.length;h++){var n=m[h];if(k!==k&&n.key!==n.key||k===n.key)return{id:l,list:m,index:h,entry:n}}return{id:l,
list:m,index:-1,entry:void 0}}function e(h){this[0]={};this[1]=b();this.size=0;if(h){h=u(h);for(var k;!(k=h.next()).done;)k=k.value,this.set(k[0],k[1])}}if(function(){if(!a||typeof a!="function"||!a.prototype.entries||typeof Object.seal!="function")return!1;try{var h=Object.seal({x:4}),k=new a(u([[h,"s"]]));if(k.get(h)!="s"||k.size!=1||k.get({x:4})||k.set({x:4},"t")!=k||k.size!=2)return!1;var l=k.entries(),m=l.next();if(m.done||m.value[0]!=h||m.value[1]!="s")return!1;m=l.next();return m.done||m.value[0].x!=
4||m.value[1]!="t"||!l.next().done?!1:!0}catch(n){return!1}}())return a;var f=new WeakMap;e.prototype.set=function(h,k){h=h===0?0:h;var l=d(this,h);l.list||(l.list=this[0][l.id]=[]);l.entry?l.entry.value=k:(l.entry={next:this[1],Ic:this[1].Ic,head:this[1],key:h,value:k},l.list.push(l.entry),this[1].Ic.next=l.entry,this[1].Ic=l.entry,this.size++);return this};e.prototype.delete=function(h){h=d(this,h);return h.entry&&h.list?(h.list.splice(h.index,1),h.list.length||delete this[0][h.id],h.entry.Ic.next=
h.entry.next,h.entry.next.Ic=h.entry.Ic,h.entry.head=null,this.size--,!0):!1};e.prototype.clear=function(){this[0]={};this[1]=this[1].Ic=b();this.size=0};e.prototype.has=function(h){return!!d(this,h).entry};e.prototype.get=function(h){return(h=d(this,h).entry)&&h.value};e.prototype.entries=function(){return c(this,function(h){return[h.key,h.value]})};e.prototype.keys=function(){return c(this,function(h){return h.key})};e.prototype.values=function(){return c(this,function(h){return h.value})};e.prototype.forEach=
function(h,k){for(var l=this.entries(),m;!(m=l.next()).done;)m=m.value,h.call(k,m[1],m[0],this)};e.prototype[Symbol.iterator]=e.prototype.entries;var g=0;return e});function Qa(a,b){a instanceof String&&(a+="");var c=0,d=!1,e={next:function(){if(!d&&c<a.length){var f=c++;return{value:b(f,a[f]),done:!1}}d=!0;return{done:!0,value:void 0}}};e[Symbol.iterator]=function(){return e};return e}fa("Array.prototype.keys",function(a){return a?a:function(){return Qa(this,function(b){return b})}});
fa("Set",function(a){function b(c){this.g=new Map;if(c){c=u(c);for(var d;!(d=c.next()).done;)this.add(d.value)}this.size=this.g.size}if(function(){if(!a||typeof a!="function"||!a.prototype.entries||typeof Object.seal!="function")return!1;try{var c=Object.seal({x:4}),d=new a(u([c]));if(!d.has(c)||d.size!=1||d.add(c)!=d||d.size!=1||d.add({x:4})!=d||d.size!=2)return!1;var e=d.entries(),f=e.next();if(f.done||f.value[0]!=c||f.value[1]!=c)return!1;f=e.next();return f.done||f.value[0]==c||f.value[0].x!=
4||f.value[1]!=f.value[0]?!1:e.next().done}catch(g){return!1}}())return a;b.prototype.add=function(c){c=c===0?0:c;this.g.set(c,c);this.size=this.g.size;return this};b.prototype.delete=function(c){c=this.g.delete(c);this.size=this.g.size;return c};b.prototype.clear=function(){this.g.clear();this.size=0};b.prototype.has=function(c){return this.g.has(c)};b.prototype.entries=function(){return this.g.entries()};b.prototype.values=function(){return this.g.values()};b.prototype.keys=b.prototype.values;b.prototype[Symbol.iterator]=
b.prototype.values;b.prototype.forEach=function(c,d){var e=this;this.g.forEach(function(f){return c.call(d,f,f,e)})};return b});fa("Array.prototype.values",function(a){return a?a:function(){return Qa(this,function(b,c){return c})}});
fa("Array.from",function(a){return a?a:function(b,c,d){c=c!=null?c:function(h){return h};var e=[],f=typeof Symbol!="undefined"&&Symbol.iterator&&b[Symbol.iterator];if(typeof f=="function"){b=f.call(b);for(var g=0;!(f=b.next()).done;)e.push(c.call(d,f.value,g++))}else for(f=b.length,g=0;g<f;g++)e.push(c.call(d,b[g],g));return e}});fa("Object.is",function(a){return a?a:function(b,c){return b===c?b!==0||1/b===1/c:b!==b&&c!==c}});
fa("Array.prototype.includes",function(a){return a?a:function(b,c){var d=this;d instanceof String&&(d=String(d));var e=d.length;c=c||0;for(c<0&&(c=Math.max(c+e,0));c<e;c++){var f=d[c];if(f===b||Object.is(f,b))return!0}return!1}});function Ra(a,b,c){if(a==null)throw new TypeError("The 'this' value for String.prototype."+c+" must not be null or undefined");if(b instanceof RegExp)throw new TypeError("First argument to String.prototype."+c+" must not be a regular expression");return a+""}
fa("String.prototype.includes",function(a){return a?a:function(b,c){return Ra(this,b,"includes").indexOf(b,c||0)!==-1}});fa("String.fromCodePoint",function(a){return a?a:function(b){for(var c="",d=0;d<arguments.length;d++){var e=Number(arguments[d]);if(e<0||e>1114111||e!==Math.floor(e))throw new RangeError("invalid_code_point "+e);e<=65535?c+=String.fromCharCode(e):(e-=65536,c+=String.fromCharCode(e>>>10&1023|55296),c+=String.fromCharCode(e&1023|56320))}return c}});
function Sa(a,b,c){a instanceof String&&(a=String(a));for(var d=a.length,e=0;e<d;e++){var f=a[e];if(b.call(c,f,e,a))return{ej:e,v:f}}return{ej:-1,v:void 0}}fa("Array.prototype.findIndex",function(a){return a?a:function(b,c){return Sa(this,b,c).ej}});
fa("WeakSet",function(a){function b(c){this.g=new WeakMap;if(c){c=u(c);for(var d;!(d=c.next()).done;)this.add(d.value)}}if(function(){if(!a||!Object.seal)return!1;try{var c=Object.seal({}),d=Object.seal({}),e=new a([c]);if(!e.has(c)||e.has(d))return!1;e.delete(c);e.add(d);return!e.has(c)&&e.has(d)}catch(f){return!1}}())return a;b.prototype.add=function(c){this.g.set(c,!0);return this};b.prototype.has=function(c){return this.g.has(c)};b.prototype.delete=function(c){return this.g.delete(c)};return b});
fa("Array.prototype.find",function(a){return a?a:function(b,c){return Sa(this,b,c).v}});fa("String.prototype.startsWith",function(a){return a?a:function(b,c){var d=Ra(this,b,"startsWith"),e=d.length,f=b.length;c=Math.max(0,Math.min(c|0,d.length));for(var g=0;g<f&&c<e;)if(d[c++]!=b[g++])return!1;return g>=f}});fa("Object.entries",function(a){return a?a:function(b){var c=[],d;for(d in b)Pa(b,d)&&c.push([d,b[d]]);return c}});
var Ta=typeof Object.assign=="function"?Object.assign:function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(d)for(var e in d)Pa(d,e)&&(a[e]=d[e])}return a};fa("Object.assign",function(a){return a||Ta});fa("Promise.prototype.finally",function(a){return a?a:function(b){return this.then(function(c){return Promise.resolve(b()).then(function(){return c})},function(c){return Promise.resolve(b()).then(function(){throw c;})})}});
fa("Array.prototype.entries",function(a){return a?a:function(){return Qa(this,function(b,c){return[b,c]})}});fa("Number.isNaN",function(a){return a?a:function(b){return typeof b==="number"&&isNaN(b)}});fa("String.prototype.repeat",function(a){return a?a:function(b){var c=Ra(this,null,"repeat");if(b<0||b>1342177279)throw new RangeError("Invalid count value");b|=0;for(var d="";b;)if(b&1&&(d+=c),b>>>=1)c+=c;return d}});fa("Number.EPSILON",function(){return 2.220446049250313E-16});
fa("Number.MAX_SAFE_INTEGER",function(){return 9007199254740991});fa("Number.isFinite",function(a){return a?a:function(b){return typeof b!=="number"?!1:!isNaN(b)&&b!==Infinity&&b!==-Infinity}});fa("Object.values",function(a){return a?a:function(b){var c=[],d;for(d in b)Pa(b,d)&&c.push(b[d]);return c}});fa("Math.log2",function(a){return a?a:function(b){return Math.log(b)/Math.LN2}});
fa("String.prototype.endsWith",function(a){return a?a:function(b,c){var d=Ra(this,b,"endsWith");c===void 0&&(c=d.length);c=Math.max(0,Math.min(c|0,d.length));for(var e=b.length;e>0&&c>0;)if(d[--c]!=b[--e])return!1;return e<=0}});fa("Math.trunc",function(a){return a?a:function(b){b=Number(b);if(isNaN(b)||b===Infinity||b===-Infinity||b===0)return b;var c=Math.floor(Math.abs(b));return b<0?-c:c}});function Va(a){a=Math.trunc(a)||0;a<0&&(a+=this.length);if(!(a<0||a>=this.length))return this[a]}
fa("Array.prototype.at",function(a){return a?a:Va});function Wa(a){return a?a:Va}fa("Int8Array.prototype.at",Wa);fa("Uint8Array.prototype.at",Wa);fa("Uint8ClampedArray.prototype.at",Wa);fa("Int16Array.prototype.at",Wa);fa("Uint16Array.prototype.at",Wa);fa("Int32Array.prototype.at",Wa);fa("Uint32Array.prototype.at",Wa);fa("Float32Array.prototype.at",Wa);fa("Float64Array.prototype.at",Wa);fa("String.prototype.at",function(a){return a?a:Va});var Xa=this||self;
function S(a,b){a=a.split(".");var c=Xa;a[0]in c||typeof c.execScript=="undefined"||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)a.length||b===void 0?c[d]&&c[d]!==Object.prototype[d]?c=c[d]:c=c[d]={}:c[d]=b};/*
 @license
 Shaka Player
 Copyright 2016 Google LLC
 SPDX-License-Identifier: Apache-2.0
*/
function T(a,b){if(b)if(b instanceof Map)for(var c=u(b.keys()),d=c.next();!d.done;d=c.next())d=d.value,Object.defineProperty(this,d,{value:b.get(d),writable:!0,enumerable:!0});else for(c in b)Object.defineProperty(this,c,{value:b[c],writable:!0,enumerable:!0});this.defaultPrevented=this.cancelable=this.bubbles=!1;this.timeStamp=window.performance&&window.performance.now?window.performance.now():Date.now();this.type=a;this.isTrusted=!1;this.target=this.currentTarget=null;this.g=!1}
function Ya(a){var b=new T(a.type),c;for(c in a)Object.defineProperty(b,c,{value:a[c],writable:!0,enumerable:!0});return b}T.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};T.prototype.stopImmediatePropagation=function(){this.g=!0};T.prototype.stopPropagation=function(){};S("shaka.util.FakeEvent",T);
var Za={Qm:"abrstatuschanged",Rm:"adaptation",Sm:"audiotrackchanged",Tm:"audiotrackschanged",Um:"boundarycrossed",Vm:"buffering",Wm:"canupdatestarttime",Xm:"complete",Ym:"currentitemchanged",Zm:"downloadcompleted",$m:"downloadfailed",an:"downloadheadersreceived",cn:"drmsessionupdate",dn:"emsg",mn:"itemsinserted",nn:"itemsremoved",Dn:"prft",Error:"error",fn:"expirationupdated",gn:"firstquartile",hn:"gapjumped",on:"keystatuschanged",rn:"loaded",tn:"loading",vn:"manifestparsed",wn:"manifestupdated",
xn:"mediaqualitychanged",yn:"mediasourcerecovered",zn:"metadataadded",Metadata:"metadata",An:"midpoint",Bn:"nospatialvideoinfo",Cn:"onstatechange",En:"ratechange",Hn:"segmentappended",In:"sessiondata",Jn:"spatialvideoinfo",Kn:"stalldetected",Ln:"started",Mn:"statechanged",Nn:"streaming",On:"textchanged",Pn:"texttrackvisibility",Qn:"thirdquartile",Rn:"timelineregionadded",Sn:"timelineregionenter",Tn:"timelineregionexit",Un:"trackschanged",Wn:"unloading",Yn:"variantchanged"};function $a(){}function ab(){}function bb(){}function cb(a){var b=Na.apply(1,arguments);db.has(a)||(db.add(a),bb.apply($a,x(b)))}function fb(){}function gb(){}function ib(){}function jb(){}function kb(){}var db=new Set;
window.console&&((new Map).set(1,function(){return console.error.apply(console,x(Na.apply(0,arguments)))}).set(2,function(){return console.warn.apply(console,x(Na.apply(0,arguments)))}).set(3,function(){return console.info.apply(console,x(Na.apply(0,arguments)))}).set(4,function(){return console.log.apply(console,x(Na.apply(0,arguments)))}).set(5,function(){return console.debug.apply(console,x(Na.apply(0,arguments)))}).set(6,function(){return console.debug.apply(console,x(Na.apply(0,arguments)))}),
bb=function(){return console.warn.apply(console,x(Na.apply(0,arguments)))},ab=function(){console.error.apply(console,x(Na.apply(0,arguments)))});function lb(){this.g=new Map}p=lb.prototype;p.push=function(a,b){this.g.has(a)?this.g.get(a).push(b):this.g.set(a,[b])};p.get=function(a){return this.g.has(a)?this.g.get(a).slice():null};p.remove=function(a,b){if(this.g.has(a)){var c=this.g.get(a).filter(function(d){return d!=b});this.g.set(a,c);c.length||this.g.delete(a)}};p.forEach=function(a){this.g.forEach(function(b,c){a(c,b)})};p.size=function(){return this.g.size};p.keys=function(){return Array.from(this.g.keys())};function mb(){this.hb=new lb;this.Ze=this}mb.prototype.addEventListener=function(a,b){this.hb&&this.hb.push(a,b)};mb.prototype.removeEventListener=function(a,b){this.hb&&this.hb.remove(a,b)};mb.prototype.dispatchEvent=function(a){if(!this.hb)return!0;var b=this.hb.get(a.type)||[],c=this.hb.get("All");c&&(b=b.concat(c));b=u(b);for(c=b.next();!c.done;c=b.next()){c=c.value;a.target=this.Ze;a.currentTarget=this.Ze;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
mb.prototype.release=function(){this.hb=null};function nb(a,b){var c=[];a=u(a);for(var d=a.next();!d.done;d=a.next())c.push(b(d.value));return c}function ob(a,b){a=u(a);for(var c=a.next();!c.done;c=a.next())if(!b(c.value))return!1;return!0}function qb(a,b){a=u(a);for(var c=a.next();!c.done;c=a.next())if(b(c.value))return!0;return!1}function rb(a,b){var c=[];a=u(a);for(var d=a.next();!d.done;d=a.next())d=d.value,b(d)&&c.push(d);return c};/*
 @license
 Copyright 2008 The Closure Library Authors
 SPDX-License-Identifier: Apache-2.0
*/
var sb=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$");/*
 @license
 Copyright 2006 The Closure Library Authors
 SPDX-License-Identifier: Apache-2.0
*/
function tb(a){var b;a instanceof tb?(ub(this,a.nc),this.yd=a.yd,vb(this,a.Lb),wb(this,a.Td),this.Vb=a.Vb,xb(this,a.g.clone()),this.hd=a.hd):a&&(b=String(a).match(sb))?(ub(this,b[1]||"",!0),this.yd=yb(b[2]||""),vb(this,b[3]||"",!0),wb(this,b[4]),this.Vb=yb(b[5]||"",!0),xb(this,b[6]||"",!0),this.hd=yb(b[7]||"")):this.g=new zb(null)}p=tb.prototype;p.nc="";p.yd="";p.Lb="";p.Td=null;p.Vb="";p.hd="";
p.toString=function(){var a=[],b=this.nc;b&&a.push(Ab(b,Bb,!0),":");if(b=this.Lb){a.push("//");var c=this.yd;c&&a.push(Ab(c,Bb,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.Td;b!=null&&a.push(":",String(b))}if(b=this.Vb)this.Lb&&b.charAt(0)!="/"&&a.push("/"),a.push(Ab(b,b.charAt(0)=="/"?Cb:Db,!0));(b=this.g.toString())&&a.push("?",b);(b=this.hd)&&a.push("#",Ab(b,Eb));return a.join("")};
p.resolve=function(a){var b=this.clone();b.nc==="data"&&(b=new tb);var c=!!a.nc;c?ub(b,a.nc):c=!!a.yd;c?b.yd=a.yd:c=!!a.Lb;c?vb(b,a.Lb):c=a.Td!=null;var d=a.Vb;if(c)wb(b,a.Td);else if(c=!!a.Vb){if(d.charAt(0)!="/")if(this.Lb&&!this.Vb)d="/"+d;else{var e=b.Vb.lastIndexOf("/");e!=-1&&(d=b.Vb.substr(0,e+1)+d)}if(d==".."||d==".")d="";else if(d.indexOf("./")!=-1||d.indexOf("/.")!=-1){e=d.lastIndexOf("/",0)==0;d=d.split("/");for(var f=[],g=0;g<d.length;){var h=d[g++];h=="."?e&&g==d.length&&f.push(""):h==
".."?((f.length>1||f.length==1&&f[0]!="")&&f.pop(),e&&g==d.length&&f.push("")):(f.push(h),e=!0)}d=f.join("/")}}c?b.Vb=d:c=a.g.toString()!=="";c?xb(b,a.g.clone()):c=!!a.hd;c&&(b.hd=a.hd);return b};p.clone=function(){return new tb(this)};function ub(a,b,c){a.nc=c?yb(b,!0):b;a.nc&&(a.nc=a.nc.replace(/:$/,""))}function vb(a,b,c){a.Lb=c?yb(b,!0):b}function wb(a,b){if(b){b=Number(b);if(isNaN(b)||b<0)throw Error("Bad port number "+b);a.Td=b}else a.Td=null}
function xb(a,b,c){b instanceof zb?a.g=b:(c||(b=Ab(b,Fb)),a.g=new zb(b))}function yb(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function Ab(a,b,c){return a!=null?(a=encodeURI(a).replace(b,Gb),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function Gb(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var Bb=/[#\/\?@]/g,Db=/[#\?:]/g,Cb=/[#\?]/g,Fb=/[#\?@]/g,Eb=/#/g;function zb(a){this.g=a||null}
function Hb(a){if(!a.ob&&(a.ob=new Map,a.le=0,a.g))for(var b=a.g.split("&"),c=0;c<b.length;c++){var d=b[c].indexOf("="),e=null;if(d>=0){var f=b[c].substring(0,d);e=b[c].substring(d+1)}else f=b[c];f=decodeURIComponent(f);e=e||"";a.add(f,decodeURIComponent(e))}}p=zb.prototype;p.ob=null;p.le=null;function Ib(a){Hb(a);return a.le}p.add=function(a,b){Hb(this);this.g=null;var c=this.ob.has(a)?this.ob.get(a):null;c||this.ob.set(a,c=[]);c.push(b);this.le++;return this};
p.set=function(a,b){Hb(this);this.g=null;this.ob.has(a)?this.ob.set(a,[b]):this.add(a,b);return this};p.get=function(a){Hb(this);return this.ob.get(a)||[]};p.toString=function(){if(this.g)return this.g;if(!this.ob||!this.ob.size)return"";for(var a=[],b=u(this.ob.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=encodeURIComponent(d);d=this.ob.get(d);for(var e=0;e<d.length;e++){var f=c;d[e]!==""&&(f+="="+encodeURIComponent(d[e]));a.push(f)}}return this.g=a.join("&")};
p.clone=function(){var a=new zb;a.g=this.g;if(this.ob){for(var b=new Map,c=u(this.ob),d=c.next();!d.done;d=c.next()){var e=u(d.value);d=e.next().value;e=e.next().value;b.set(d,e.concat())}a.ob=b;a.le=this.le}return a};function Jb(){}function Kb(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!=b.byteLength)return!1;if((ArrayBuffer.isView(a)?a.buffer:a)==(ArrayBuffer.isView(b)?b.buffer:b)&&(a.byteOffset||0)==(b.byteOffset||0))return!0;var c=Lb(a);b=Lb(b);for(var d=0;d<a.byteLength;d++)if(c[d]!=b[d])return!1;return!0}function Mb(a){return ArrayBuffer.isView(a)?a.byteOffset==0&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer:a}
function Lb(a,b,c){c=c===void 0?Infinity:c;return Nb(a,b===void 0?0:b,c,Uint8Array)}function Ob(a,b,c){c=c===void 0?Infinity:c;return Nb(a,b===void 0?0:b,c,Uint16Array)}function Pb(a,b,c){c=c===void 0?Infinity:c;return Nb(a,b===void 0?0:b,c,DataView)}
function Nb(a,b,c,d){var e=ArrayBuffer.isView(a)?a.buffer:a,f=1;"BYTES_PER_ELEMENT"in d&&(f=d.BYTES_PER_ELEMENT);var g=((a.byteOffset||0)+a.byteLength)/f;a=Math.floor(Math.max(0,Math.min(((a.byteOffset||0)+b)/f,g)));return new d(e,a,Math.floor(Math.min(a+Math.max(c,0),g))-a)}S("shaka.util.BufferUtils",Jb);Jb.toDataView=Pb;Jb.toUint16=Ob;Jb.toUint8=Lb;Jb.toArrayBuffer=Mb;Jb.equal=Kb;function U(a,b,c){var d=Na.apply(3,arguments);this.severity=a;this.category=b;this.code=c;this.data=d;this.handled=!1;this.message="Shaka Error "+this.code;if(Qb)try{throw Error(this.message||"Shaka Error");}catch(e){this.stack=e.stack}}U.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null,"  ")};S("shaka.util.Error",U);var Qb=!0;U.Severity={RECOVERABLE:1,CRITICAL:2};U.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10};
var Rb={UNSUPPORTED_SCHEME:1E3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,REQUEST_FILTER_ERROR:1006,RESPONSE_FILTER_ERROR:1007,MALFORMED_TEST_URI:1008,UNEXPECTED_TEST_REQUEST:1009,ATTEMPTS_EXHAUSTED:1010,SEGMENT_MISSING:1011,INVALID_TEXT_HEADER:2E3,INVALID_TEXT_CUE:2001,UNABLE_TO_DETECT_ENCODING:2003,BAD_ENCODING:2004,INVALID_XML:2005,INVALID_MP4_TTML:2007,INVALID_MP4_VTT:2008,UNABLE_TO_EXTRACT_CUE_START_TIME:2009,INVALID_MP4_CEA:2010,TEXT_COULD_NOT_GUESS_MIME_TYPE:2011,
CANNOT_ADD_EXTERNAL_TEXT_TO_SRC_EQUALS:2012,TEXT_ONLY_WEBVTT_SRC_EQUALS:2013,MISSING_TEXT_PLUGIN:2014,UNSUPPORTED_EXTERNAL_THUMBNAILS_URI:2017,BUFFER_READ_OUT_OF_BOUNDS:3E3,JS_INTEGER_OVERFLOW:3001,EBML_OVERFLOW:3002,EBML_BAD_FLOATING_POINT_SIZE:3003,MP4_SIDX_WRONG_BOX_TYPE:3004,MP4_SIDX_INVALID_TIMESCALE:3005,MP4_SIDX_TYPE_NOT_SUPPORTED:3006,WEBM_CUES_ELEMENT_MISSING:3007,WEBM_EBML_HEADER_ELEMENT_MISSING:3008,WEBM_SEGMENT_ELEMENT_MISSING:3009,WEBM_INFO_ELEMENT_MISSING:3010,WEBM_DURATION_ELEMENT_MISSING:3011,
WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING:3012,WEBM_CUE_TIME_ELEMENT_MISSING:3013,MEDIA_SOURCE_OPERATION_FAILED:3014,MEDIA_SOURCE_OPERATION_THREW:3015,VIDEO_ERROR:3016,QUOTA_EXCEEDED_ERROR:3017,TRANSMUXING_FAILED:3018,CONTENT_TRANSFORMATION_FAILED:3019,MSS_MISSING_DATA_FOR_TRANSMUXING:3020,MSS_TRANSMUXING_FAILED:3022,TRANSMUXING_NO_VIDEO_DATA:3023,STREAMING_NOT_ALLOWED:3024,UNABLE_TO_GUESS_MANIFEST_TYPE:4E3,DASH_INVALID_XML:4001,DASH_NO_SEGMENT_INFO:4002,DASH_EMPTY_ADAPTATION_SET:4003,DASH_EMPTY_PERIOD:4004,
DASH_WEBM_MISSING_INIT:4005,DASH_UNSUPPORTED_CONTAINER:4006,DASH_PSSH_BAD_ENCODING:4007,DASH_NO_COMMON_KEY_SYSTEM:4008,DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED:4009,DASH_CONFLICTING_KEY_IDS:4010,RESTRICTIONS_CANNOT_BE_MET:4012,HLS_PLAYLIST_HEADER_MISSING:4015,INVALID_HLS_TAG:4016,HLS_INVALID_PLAYLIST_HIERARCHY:4017,DASH_DUPLICATE_REPRESENTATION_ID:4018,HLS_MULTIPLE_MEDIA_INIT_SECTIONS_FOUND:4020,HLS_REQUIRED_ATTRIBUTE_MISSING:4023,HLS_REQUIRED_TAG_MISSING:4024,HLS_COULD_NOT_GUESS_CODECS:4025,HLS_KEYFORMATS_NOT_SUPPORTED:4026,
DASH_UNSUPPORTED_XLINK_ACTUATE:4027,DASH_XLINK_DEPTH_LIMIT:4028,CONTENT_UNSUPPORTED_BY_BROWSER:4032,CANNOT_ADD_EXTERNAL_TEXT_TO_LIVE_STREAM:4033,NO_VARIANTS:4036,PERIOD_FLATTENING_FAILED:4037,INCONSISTENT_DRM_ACROSS_PERIODS:4038,HLS_VARIABLE_NOT_FOUND:4039,HLS_MSE_ENCRYPTED_MP2T_NOT_SUPPORTED:4040,HLS_MSE_ENCRYPTED_LEGACY_APPLE_MEDIA_KEYS_NOT_SUPPORTED:4041,NO_WEB_CRYPTO_API:4042,CANNOT_ADD_EXTERNAL_THUMBNAILS_TO_LIVE_STREAM:4045,MSS_INVALID_XML:4046,MSS_LIVE_CONTENT_NOT_SUPPORTED:4047,AES_128_INVALID_IV_LENGTH:4048,
AES_128_INVALID_KEY_LENGTH:4049,DASH_CONFLICTING_AES_128:4050,DASH_UNSUPPORTED_AES_128:4051,DASH_INVALID_PATCH:4052,HLS_EMPTY_MEDIA_PLAYLIST:4053,DASH_MSE_ENCRYPTED_LEGACY_APPLE_MEDIA_KEYS_NOT_SUPPORTED:4054,CANNOT_ADD_EXTERNAL_CHAPTERS_TO_LIVE_STREAM:4055,STREAMING_ENGINE_STARTUP_INVALID_STATE:5006,NO_RECOGNIZED_KEY_SYSTEMS:6E3,REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE:6001,FAILED_TO_CREATE_CDM:6002,FAILED_TO_ATTACH_TO_VIDEO:6003,INVALID_SERVER_CERTIFICATE:6004,FAILED_TO_CREATE_SESSION:6005,FAILED_TO_GENERATE_LICENSE_REQUEST:6006,
LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,NO_LICENSE_SERVER_GIVEN:6012,OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,SERVER_CERTIFICATE_REQUIRED:6015,INIT_DATA_TRANSFORM_ERROR:6016,SERVER_CERTIFICATE_REQUEST_FAILED:6017,MIN_HDCP_VERSION_NOT_MATCH:6018,ERROR_CHECKING_HDCP_VERSION:6019,MISSING_EME_SUPPORT:6020,LOAD_INTERRUPTED:7E3,OPERATION_ABORTED:7001,NO_VIDEO_ELEMENT:7002,OBJECT_DESTROYED:7003,CONTENT_NOT_LOADED:7004,SRC_EQUALS_PRELOAD_NOT_SUPPORTED:7005,
PRELOAD_DESTROYED:7006,QUEUE_INDEX_OUT_OF_BOUNDS:7007,CAST_API_UNAVAILABLE:8E3,NO_CAST_RECEIVERS:8001,ALREADY_CASTING:8002,UNEXPECTED_CAST_ERROR:8003,CAST_CANCELED_BY_USER:8004,CAST_CONNECTION_TIMED_OUT:8005,CAST_RECEIVER_APP_UNAVAILABLE:8006,STORAGE_NOT_SUPPORTED:9E3,INDEXED_DB_ERROR:9001,DEPRECATED_OPERATION_ABORTED:9002,REQUESTED_ITEM_NOT_FOUND:9003,MALFORMED_OFFLINE_URI:9004,CANNOT_STORE_LIVE_OFFLINE:9005,NO_INIT_DATA_FOR_OFFLINE:9007,LOCAL_PLAYER_INSTANCE_REQUIRED:9008,NEW_KEY_OPERATION_NOT_SUPPORTED:9011,
KEY_NOT_FOUND:9012,MISSING_STORAGE_CELL:9013,STORAGE_LIMIT_REACHED:9014,DOWNLOAD_SIZE_CALLBACK_ERROR:9015,MODIFY_OPERATION_NOT_SUPPORTED:9016,INDEXED_DB_INIT_TIMED_OUT:9017,CS_IMA_SDK_MISSING:1E4,CS_AD_MANAGER_NOT_INITIALIZED:10001,SS_IMA_SDK_MISSING:10002,SS_AD_MANAGER_NOT_INITIALIZED:10003,CURRENT_DAI_REQUEST_NOT_FINISHED:10004,MT_AD_MANAGER_NOT_INITIALIZED:10005,INTERSTITIAL_AD_MANAGER_NOT_INITIALIZED:10006,VAST_INVALID_XML:10007};U.Code=Rb;function Sb(a){this.h=a;this.g=void 0}Sb.prototype.value=function(){this.g===void 0&&(this.g=this.h());return this.g};/*
 @license
 Shaka Player
 Copyright 2025 Google LLC
 SPDX-License-Identifier: Apache-2.0
*/
function Tb(){return Ub.value()}var Vb=null,Wb=null,Ub=new Sb(function(){var a=void 0;Vb&&(a=Vb());!a&&Wb&&(a=Wb());return a});function Xb(){}
function Yb(a){if(!a)return"";a=Lb(a);a[0]==239&&a[1]==187&&a[2]==191&&(a=a.subarray(3));if(window.TextDecoder&&!Tb().ki())return a=(new TextDecoder).decode(a),a.includes("\ufffd")&&ab('Decoded string contains an "unknown character" codepoint.  That probably means the UTF8 encoding was incorrect!'),a;for(var b="",c=0;c<a.length;++c){var d=65533;(a[c]&128)==0?d=a[c]:a.length>=c+2&&(a[c]&224)==192&&(a[c+1]&192)==128?(d=(a[c]&31)<<6|a[c+1]&63,c+=1):a.length>=c+3&&(a[c]&240)==224&&(a[c+1]&192)==128&&
(a[c+2]&192)==128?(d=(a[c]&15)<<12|(a[c+1]&63)<<6|a[c+2]&63,c+=2):a.length>=c+4&&(a[c]&241)==240&&(a[c+1]&192)==128&&(a[c+2]&192)==128&&(a[c+3]&192)==128&&(d=(a[c]&7)<<18|(a[c+1]&63)<<12|(a[c+2]&63)<<6|a[c+3]&63,c+=3);if(d<=65535)b+=String.fromCharCode(d);else{d-=65536;var e=d&1023;b+=String.fromCharCode(55296+(d>>10));b+=String.fromCharCode(56320+e)}}return b}
function Zb(a,b,c){if(!a)return"";if(!c&&a.byteLength%2!=0)throw new U(2,2,2004);c=Math.floor(a.byteLength/2);var d=new Uint16Array(c);a=Pb(a);for(var e=0;e<c;e++)d[e]=a.getUint16(e*2,b);return $b(d)}
function ac(a){function b(d){return c.byteLength<=d||c[d]>=9&&c[d]<=126}if(!a)return"";var c=Lb(a);if(c[0]==239&&c[1]==187&&c[2]==191)return Yb(c);if(c[0]==254&&c[1]==255)return Zb(c.subarray(2),!1);if(c[0]==255&&c[1]==254)return Zb(c.subarray(2),!0);if(c[0]==0&&c[2]==0)return Zb(a,!1);if(c[1]==0&&c[3]==0)return Zb(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return Yb(a);throw new U(2,2,2003);}
function bc(a){if(window.TextEncoder&&!Tb().ki()){var b=new TextEncoder;return Mb(b.encode(a))}a=encodeURIComponent(a);a=unescape(a);b=new Uint8Array(a.length);for(var c=0;c<a.length;c++)b[c]=a[c].charCodeAt(0);return Mb(b)}function cc(a,b){for(var c=new ArrayBuffer(a.length*2),d=new DataView(c),e=0;e<a.length;++e)d.setUint16(e*2,a.charCodeAt(e),b);return c}function $b(a){return dc.value()(a)}
function ec(a){var b={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&apos;":"'","&nbsp;":"\u00a0","&lrm;":"\u200e","&rlm;":"\u200f"},c=/&(?:amp|lt|gt|quot|apos|nbsp|lrm|rlm|#[xX]?[0-9a-fA-F]+);/g,d=RegExp(c.source);return a&&d.test(a)?a.replace(c,function(e){return e[1]=="#"?(e=e[2]=="x"||e[2]=="X"?parseInt(e.substring(3),16):parseInt(e.substring(2),10),e>=0&&e<=1114111?String.fromCodePoint(e):""):b[e]||"'"}):a||""}S("shaka.util.StringUtils",Xb);Xb.resetFromCharCode=function(){dc.g=void 0};
Xb.toUTF16=cc;Xb.toUTF8=bc;Xb.fromBytesAutoDetect=ac;Xb.fromUTF16=Zb;Xb.fromUTF8=Yb;var dc=new Sb(function(){function a(c){try{var d=new Uint8Array(c);return String.fromCharCode.apply(null,d).length>0}catch(e){return!1}}for(var b={cd:65536};b.cd>0;b={cd:b.cd},b.cd/=2)if(a(b.cd))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.cd)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.cd));return e}}(b);return null});function fc(){}function hc(a){a=$b(Lb(a));return btoa(a)}function jc(a,b){b=b==void 0?!0:b;a=hc(a).replace(/\+/g,"-").replace(/\//g,"_");return b?a:a.replace(/[=]*$/,"")}function lc(a){a=window.atob(a.replace(/-/g,"+").replace(/_/g,"/"));for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b}function mc(a){for(var b=a.length/2,c=new Uint8Array(b),d=0;d<b;d++)c[d]=window.parseInt(a.substr(d*2,2),16);return c}
function nc(a){var b=Lb(a);a="";b=u(b);for(var c=b.next();!c.done;c=b.next())c=c.value,c=c.toString(16),c.length==1&&(c="0"+c),a+=c;return a}function oc(){for(var a=Na.apply(0,arguments),b=0,c=0;c<a.length;++c)b+=a[c].byteLength;b=new Uint8Array(b);for(var d=c=0;d<a.length;++d){var e=a[d];ArrayBuffer.isView(e)&&e.BYTES_PER_ELEMENT===1?b.set(e,c):b.set(Lb(e),c);c+=e.byteLength}return b}S("shaka.util.Uint8ArrayUtils",fc);fc.concat=oc;fc.toHex=nc;fc.fromHex=mc;fc.fromBase64=lc;fc.toBase64=jc;
fc.toStandardBase64=hc;function pc(a,b,c){c=c===void 0?"":c;if(b.length==0)return a;if(a.length==1&&b.length==1){var d=new tb(a[0]);b=new tb(b[0]);b=d.resolve(b);c&&xb(b,c);return[b.toString()]}b=b.map(function(h){return new tb(h)});d=[];a=u(a);for(var e=a.next();!e.done;e=a.next()){e=new tb(e.value);for(var f=u(b),g=f.next();!g.done;g=f.next())g=e.resolve(g.value),c&&xb(g,c),d.push(g.toString())}return d}
function qc(a,b,c,d){a={keySystem:a,encryptionScheme:b,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:c||[],keyIds:new Set};d&&(a.keySystemUris=new Set([d]));return a}
function rc(a,b){b=b===void 0?"cenc":b;var c=[],d=[],e=[];a.forEach(function(g,h){var k=h;k.length!=22&&(k=jc(mc(h),!1));var l=g;l.length!=22&&(l=jc(mc(g),!1));g={kty:"oct",kid:k,k:l};c.push(g);d.push(g.kid);e.push(h)});a=JSON.stringify({keys:c});var f=JSON.stringify({kids:d});f=[{initData:Lb(bc(f)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",encryptionScheme:b,licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,
audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:f,keyIds:new Set(e)}}function sc(a,b){if(b.length==1)return b[0];a=tc(a,b);if(a!=null)return a;throw new U(2,4,4025,b);}function tc(a,b){var c=uc.get(a);c=u(c);for(var d=c.next();!d.done;d=c.next()){d=d.value;for(var e=u(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.test(f.trim()))return f.trim()}return a==vc?"":null}
function wc(a,b){var c=[];a=uc.get(a);a=u(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;for(var e=u(b),f=e.next();!f.done;f=e.next())f=f.value,d.test(f.trim())&&c.push(f.trim())}return c}
var vc="text",xc={Ha:"video",na:"audio",Va:vc,Ag:"image",Om:"application"},yc=1/15,uc=(new Map).set("audio",[/^vorbis$/,/^Opus$/,/^opus$/,/^fLaC$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4/,/^dts[cex]$/,/^iamf/,/^mhm[12]/,/^ac3$/,/^eac3$/,/^apac$/]).set("video",[/^avc/,/^hev/,/^hvc/,/^vvc/,/^vvi/,/^vp0?[89]/,/^av01/,/^dvh/,/^dva/,/^dav/]).set("text",[/^vtt$/,/^wvtt/,/^stpp/]);function zc(){}function Ac(a,b){a=Bc(a);b=Bc(b);return a.split("-")[0]==b.split("-")[0]}function Cc(a,b){a=Bc(a);b=Bc(b);a=a.split("-");b=b.split("-");return a[0]==b[0]&&a.length==1&&b.length==2}function Dc(a,b){a=Bc(a);b=Bc(b);a=a.split("-");b=b.split("-");return a.length==2&&b.length==2&&a[0]==b[0]}
function Bc(a){a=u(a.split("-x-"));var b=a.next().value;b=b===void 0?"":b;a=a.next().value;a=a===void 0?"":a;var c=u(b.split("-"));b=c.next().value;b=b===void 0?"":b;c=c.next().value;c=c===void 0?"":c;a=a?"x-"+a:"";b=b.toLowerCase();b=Ec.get(b)||b;c=c.toUpperCase();return(c?b+"-"+c:b)+(a?"-"+a:"")}function Gc(a,b){var c=Hc(a),d=Hc(b);return a!=c&&b!=d&&c==d}function Ic(a,b){a=Bc(a);b=Bc(b);return b==a?4:Cc(b,a)?3:Dc(b,a)?2:Cc(a,b)?1:0}
function Hc(a){var b=a.indexOf("-");a=b>=0?a.substring(0,b):a;a=a.toLowerCase();return a=Ec.get(a)||a}function Jc(a){return a.language?Bc(a.language):a.audio&&a.audio.language?Bc(a.audio.language):a.video&&a.video.language?Bc(a.video.language):"und"}
function Kc(a,b){a=Bc(a);var c=new Set;b=u(b);for(var d=b.next();!d.done;d=b.next())c.add(Bc(d.value));b=u(c);for(d=b.next();!d.done;d=b.next())if(d=d.value,d==a)return d;b=u(c);for(d=b.next();!d.done;d=b.next())if(d=d.value,Cc(d,a))return d;b=u(c);for(d=b.next();!d.done;d=b.next())if(d=d.value,Dc(d,a))return d;c=u(c);for(b=c.next();!b.done;b=c.next())if(b=b.value,Cc(a,b))return b;return null}S("shaka.util.LanguageUtils",zc);zc.findClosestLocale=Kc;zc.getLocaleForVariant=Jc;
zc.getLocaleForText=function(a){return Bc(a.language||"und")};zc.getBase=Hc;zc.relatedness=Ic;zc.areSiblings=Gc;zc.normalize=Bc;zc.isSiblingOf=Dc;zc.isParentOf=Cc;zc.areLanguageCompatible=Ac;zc.areLocaleCompatible=function(a,b){a=Bc(a);b=Bc(b);return a==b};
var Ec=new Map([["aar","aa"],["abk","ab"],["afr","af"],["aka","ak"],["alb","sq"],["amh","am"],["ara","ar"],["arg","an"],["arm","hy"],["asm","as"],["ava","av"],["ave","ae"],["aym","ay"],["aze","az"],["bak","ba"],["bam","bm"],["baq","eu"],["bel","be"],["ben","bn"],["bih","bh"],["bis","bi"],["bod","bo"],["bos","bs"],["bre","br"],["bul","bg"],["bur","my"],["cat","ca"],["ces","cs"],["cha","ch"],["che","ce"],["chi","zh"],["chu","cu"],["chv","cv"],["cor","kw"],["cos","co"],["cre","cr"],["cym","cy"],["cze",
"cs"],["dan","da"],["deu","de"],["div","dv"],["dut","nl"],["dzo","dz"],["ell","el"],["eng","en"],["epo","eo"],["est","et"],["eus","eu"],["ewe","ee"],["fao","fo"],["fas","fa"],["fij","fj"],["fin","fi"],["fra","fr"],["fre","fr"],["fry","fy"],["ful","ff"],["geo","ka"],["ger","de"],["gla","gd"],["gle","ga"],["glg","gl"],["glv","gv"],["gre","el"],["grn","gn"],["guj","gu"],["hat","ht"],["hau","ha"],["heb","he"],["her","hz"],["hin","hi"],["hmo","ho"],["hrv","hr"],["hun","hu"],["hye","hy"],["ibo","ig"],["ice",
"is"],["ido","io"],["iii","ii"],["iku","iu"],["ile","ie"],["ina","ia"],["ind","id"],["ipk","ik"],["isl","is"],["ita","it"],["jav","jv"],["jpn","ja"],["kal","kl"],["kan","kn"],["kas","ks"],["kat","ka"],["kau","kr"],["kaz","kk"],["khm","km"],["kik","ki"],["kin","rw"],["kir","ky"],["kom","kv"],["kon","kg"],["kor","ko"],["kua","kj"],["kur","ku"],["lao","lo"],["lat","la"],["lav","lv"],["lim","li"],["lin","ln"],["lit","lt"],["ltz","lb"],["lub","lu"],["lug","lg"],["mac","mk"],["mah","mh"],["mal","ml"],["mao",
"mi"],["mar","mr"],["may","ms"],["mkd","mk"],["mlg","mg"],["mlt","mt"],["mon","mn"],["mri","mi"],["msa","ms"],["mya","my"],["nau","na"],["nav","nv"],["nbl","nr"],["nde","nd"],["ndo","ng"],["nep","ne"],["nld","nl"],["nno","nn"],["nob","nb"],["nor","no"],["nya","ny"],["oci","oc"],["oji","oj"],["ori","or"],["orm","om"],["oss","os"],["pan","pa"],["per","fa"],["pli","pi"],["pol","pl"],["por","pt"],["pus","ps"],["que","qu"],["roh","rm"],["ron","ro"],["rum","ro"],["run","rn"],["rus","ru"],["sag","sg"],["san",
"sa"],["sin","si"],["slk","sk"],["slo","sk"],["slv","sl"],["sme","se"],["smo","sm"],["sna","sn"],["snd","sd"],["som","so"],["sot","st"],["spa","es"],["sqi","sq"],["srd","sc"],["srp","sr"],["ssw","ss"],["sun","su"],["swa","sw"],["swe","sv"],["tah","ty"],["tam","ta"],["tat","tt"],["tel","te"],["tgk","tg"],["tgl","tl"],["tha","th"],["tib","bo"],["tir","ti"],["ton","to"],["tsn","tn"],["tso","ts"],["tuk","tk"],["tur","tr"],["twi","tw"],["uig","ug"],["ukr","uk"],["urd","ur"],["uzb","uz"],["ven","ve"],["vie",
"vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function Lc(a){mb.call(this);this.j=Bc(a);this.i=new Map;this.g=new Set;this.h=new Map}ma(Lc,mb);p=Lc.prototype;p.release=function(){mb.prototype.release.call(this)};
p.Li=function(a){var b=this;this.g.clear();a=u(a);for(var c=a.next();!c.done;c=a.next())this.g.add(Bc(c.value));Mc(this);a=rb(this.g,function(d){return!b.h.has(d)});a.length&&this.dispatchEvent(new T("unknown-locales",(new Map).set("locales",a)));a=rb(this.g,function(d){return b.h.has(d)});a=(new Map).set("locales",a.length?a:[this.j]);this.dispatchEvent(new T("locale-changed",a))};
p.Xa=function(a,b,c){a=Bc(a);c===void 0&&(c=Nc);var d=this.h.get(a)||new Map;b.forEach(function(e,f){d.has(f)&&c!=Nc||d.set(f,e)});this.h.set(a,d);Mc(this);this.dispatchEvent(new T("locale-updated"));return this};p.tm=function(a){for(var b=u(a.keys()),c=b.next();!c.done;c=b.next())c=c.value,a.set(c,this.resolve(c))};p.resolve=function(a){var b=this.i.get(a);if(b)return b;a=(new Map).set("locales",Array.from(this.g)).set("missing",a);this.dispatchEvent(new T("unknown-localization",a));return""};
p.Rk=function(){return this.g};
function Mc(a){for(var b=a.h,c=a.j,d=a.g,e=new Set,f=u(d),g=f.next(),h={};!g.done;h={Ae:void 0},g=f.next()){h.Ae=g.value;e.add(h.Ae);e.add(Hc(h.Ae));g=rb(b.keys(),function(l){return function(m){return Gc(m,l.Ae)}}(h));g.sort();g=u(g);for(var k=g.next();!k.done;k=g.next())e.add(k.value);h=rb(b.keys(),function(l){return function(m){return Hc(m)==l.Ae}}(h));h.sort();h=u(h);for(g=h.next();!g.done;g=h.next())e.add(g.value)}e.add(c);c=[];e=u(e);for(f=e.next();!f.done;f=e.next())(f=b.get(f.value))&&c.push(f);
c.reverse();a.i.clear();b=u(c);for(e=b.next();!e.done;e=b.next())e.value.forEach(function(l,m){a.i.set(m,l)});b=a.i.keys();e=new Set;c=u(a.g);for(f=c.next();!f.done;f=c.next())f=a.h.get(f.value)||new Map,Oc(f,b,e);e.size>0&&(d=(new Map).set("locales",Array.from(d)).set("missing",Array.from(e)),a.dispatchEvent(new T("missing-localizations",d)))}function Oc(a,b,c){b=u(b);for(var d=b.next();!d.done;d=b.next())d=d.value,a.get(d)||c.add(d)}S("shaka.ui.Localization",Lc);Lc.prototype.getCurrentLocales=Lc.prototype.Rk;
Lc.prototype.resolve=Lc.prototype.resolve;Lc.prototype.resolveDictionary=Lc.prototype.tm;Lc.prototype.insert=Lc.prototype.Xa;Lc.prototype.changeLocale=Lc.prototype.Li;Lc.prototype.release=Lc.prototype.release;var Nc=1;Lc.ConflictResolution={USE_OLD:0,USE_NEW:Nc};Lc.UNKNOWN_LOCALES="unknown-locales";Lc.UNKNOWN_LOCALIZATION="unknown-localization";Lc.MISSING_LOCALIZATIONS="missing-localizations";Lc.LOCALE_CHANGED="locale-changed";Lc.LOCALE_UPDATED="locale-updated";function Pc(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}Pc.prototype.sample=function(a,b){var c=Math.pow(this.g,a);b=b*(1-c)+c*this.h;isNaN(b)||(this.h=b,this.i+=a)};function Qc(a){return a.h/(1-Math.pow(a.g,a.i))};function Rc(){this.h=new Pc(2);this.j=new Pc(5);this.g=0;this.i=128E3;this.l=16E3}Rc.prototype.configure=function(a){this.i=a.minTotalBytes;this.l=a.minBytes;this.h.g=Math.exp(Math.log(.5)/a.fastHalfLife);this.j.g=Math.exp(Math.log(.5)/a.slowHalfLife)};Rc.prototype.sample=function(a,b){if(!(b<this.l)){var c=8E3*b/a;a/=1E3;this.g+=b;this.h.sample(a,c);this.j.sample(a,c)}};Rc.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(Qc(this.h),Qc(this.j))};function Sc(a,b){return typeof a==="number"&&typeof b==="number"&&isNaN(a)&&isNaN(b)?!0:a===b}function Tc(a,b){b=a.indexOf(b);b>-1&&a.splice(b,1)}function Uc(a,b,c){c||(c=Sc);if(a.length!=b.length)return!1;b=b.slice();a=u(a);for(var d=a.next(),e={};!d.done;e={kj:void 0},d=a.next()){e.kj=d.value;d=b.findIndex(function(f){return function(g){return c(f.kj,g)}}(e));if(d==-1)return!1;b[d]=b[b.length-1];b.pop()}return b.length==0}
function Vc(a,b,c){if(a===b)return!0;if(!a||!b)return a==b;c||(c=Sc);if(a.length!=b.length)return!1;for(var d=0;d<a.length;d++)if(!c(a[d],b[d]))return!1;return!0};function Wc(){this.g=new lb}p=Wc.prototype;p.release=function(){this.Sa();this.g=null};p.o=function(a,b,c,d){this.g&&(a=new Xc(a,b,c,d),this.g.push(b,a))};p.ua=function(a,b,c,d){function e(g){f.Ea(a,b,e);c(g)}var f=this;this.o(a,b,e,d)};p.Ea=function(a,b,c){if(this.g){var d=this.g.get(b)||[];d=u(d);for(var e=d.next();!e.done;e=d.next())e=e.value,e.target!=a||c!=e.listener&&c||(e.Ea(),this.g.remove(b,e))}};
p.Sa=function(){if(this.g){for(var a=[],b=u(this.g.g.values()),c=b.next();!c.done;c=b.next())a.push.apply(a,x(c.value));a=u(a);for(b=a.next();!b.done;b=a.next())b.value.Ea();this.g.g.clear()}};S("shaka.util.EventManager",Wc);Wc.prototype.removeAll=Wc.prototype.Sa;Wc.prototype.unlisten=Wc.prototype.Ea;Wc.prototype.listenOnce=Wc.prototype.ua;Wc.prototype.listen=Wc.prototype.o;Wc.prototype.release=Wc.prototype.release;
function Xc(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=Yc(a,d);this.target.addEventListener(b,c,this.g)}Xc.prototype.Ea=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function Yc(a,b){if(b==void 0)return!1;if(typeof b=="boolean")return b;var c=new Set(["passive","capture"]);Object.keys(b).filter(function(d){return!c.has(d)});return Zc(a)?b:b.capture||!1}
function Zc(a){var b=$c;if(b==void 0){b=!1;try{var c={},d={get:function(){b=!0;return!1}};Object.defineProperty(c,"passive",d);Object.defineProperty(c,"capture",d);d=function(){};a.addEventListener("test",d,c);a.removeEventListener("test",d,c)}catch(e){b=!1}$c=b}return b||!1}var $c=void 0;S("shaka.config.AutoShowText",{NEVER:0,ALWAYS:1,IF_PREFERRED_TEXT_LANGUAGE:2,IF_SUBTITLES_MAY_BE_NEEDED:3});function ad(a,b){this.g=a;this.h=b}ad.prototype.toString=function(){return"v"+this.g+"."+this.h};function bd(a,b){var c=new ad(5,0),d=cd,e=d.g,f=c.h-e.h;((c.g-e.g||f)>0?d.i:d.h)(d.g,c,a,b)}function dd(a,b,c,d){bb([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function ed(a,b,c,d){ab([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(" "))}var cd=null;function fd(a,b,c,d){this.g=null;this.l=a;this.i=b;this.m=c;this.u=d;this.j=!1;a:{typeof libDPIModule==="undefined"&&bb("Could not find LCEVC Library dependencies on this page");if(typeof LCEVCdec!=="undefined")this.h=LCEVCdec;else if(typeof LcevcDil!=="undefined")this.h=LcevcDil,this.j=!0,bd("LcevcDil","lcevc_dil.js is deprecated, please use lcevc_dec.js instead");else{bb("Could not find LCEVC Library on this page");a=!1;break a}typeof this.h.SupportObject==="undefined"?(bb("Could not find LCEVC Library on this page"),
a=!1):(this.h.SupportObject.SupportStatus||bb(this.h.SupportObject.SupportError),a=typeof this.h!=="undefined"&&typeof libDPIModule!=="undefined"&&this.i instanceof HTMLCanvasElement&&this.h.SupportObject.SupportStatus)}a&&!this.g&&this.h.SupportObject.webGLSupport(this.i)&&(this.i.classList.remove("shaka-hidden"),this.g=this.j?new this.h.LcevcDil(this.l,this.i,this.m):new this.h.LCEVCdec(this.l,this.i,this.m))}
function gd(a,b,c,d){d.type!=="video"||a.u&&!d.baseOriginalId||a.g&&a.g.appendBuffer(b,"video",d.id,-c,!a.u)}function hd(a){a.g&&a.i.classList.add("shaka-hidden")}fd.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function id(a){return a&&typeof LCEVCdec!=="undefined"?a.codecs=="lvc1":!1}S("shaka.lcevc.Dec",fd);fd.prototype.release=fd.prototype.release;function jd(a){if(ld.has(a))return ld.get(a);var b=window.ManagedMediaSource||window.MediaSource;return b?(b=b.isTypeSupported(a),ld.set(a,b),b):!1}function md(){var a=window.ManagedSourceBuffer||window.SourceBuffer;return!!a&&!!a.prototype&&!!a.prototype.changeType}function nd(){var a=window.ManagedMediaSource||window.MediaSource;return a&&a.prototype?!!a.prototype.setLiveSeekableRange&&!!a.prototype.clearLiveSeekableRange:!1}var ld=new Map;function od(){}od.prototype.extract=function(){};od.prototype.decode=function(){return[]};od.prototype.clear=function(){};od.prototype.getStreams=function(){return[]};function pd(){}pd.prototype.init=function(){};pd.prototype.parse=function(){return[]};function qd(){}p=qd.prototype;p.init=function(){};p.Wf=function(){};p.ge=function(){};p.remove=function(){};p.Bg=function(){};S("shaka.media.IClosedCaptionParser",qd);function rd(a){this.h=new Map;this.i=0;this.j=new pd;if(a=td(a.toLowerCase()))this.j=a();this.g=new od;if(a=ud)this.g=a(),this.h.set(this.i,this.g)}p=rd.prototype;
p.init=function(a,b,c){b=b===void 0?!1:b;c=c===void 0?-1:c;if(c!=-1&&this.i!=c){b=c;var d=this.h.get(b);this.h.set(this.i,this.g);if(d)this.g=d;else{if(d=ud)this.g=d();this.h.set(b,this.g)}}else b||this.ge();this.j.init(a);c!=-1&&(this.i=c)};p.Wf=function(a){a=this.j.parse(a);a=u(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;var c=Lb(b.packet);c.length>0&&this.g.extract(c,b.pts)}return this.g.decode()};p.ge=function(){this.g.clear()};
p.remove=function(a){a=a===void 0?[]:a;a=new Set(a);for(var b=u(this.h.keys()),c=b.next();!c.done;c=b.next())if(c=c.value,!a.has(c)){var d=this.h.get(c);d&&d.clear();this.h.delete(c)}};p.Bg=function(){return this.g.getStreams()};function vd(a,b){wd.set(a,b)}function td(a){return wd.get(a)}S("shaka.media.ClosedCaptionParser",rd);rd.findDecoder=function(){return ud};rd.unregisterDecoder=function(){ud=null};rd.registerDecoder=function(a){ud=a};rd.findParser=td;rd.unregisterParser=function(a){wd.delete(a)};
rd.registerParser=vd;var wd=new Map,ud=null;function xd(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=yd;this.scroll=zd}S("shaka.text.CueRegion",xd);var yd=1;xd.units={PX:0,PERCENTAGE:yd,LINES:2};var zd="";xd.scrollMode={NONE:zd,UP:"up"};function Ad(a){this.h=a||"";this.g=0}function Bd(a){Cd(a,/[ \t]+/gm)}function Cd(a,b){b.lastIndex=a.g;b=b.exec(a.h);b=b==null?null:{position:b.index,length:b[0].length,results:b};if(a.g==a.h.length||b==null||b.position!=a.g)return null;a.g+=b.length;return b.results}function Dd(a){return a.g==a.h.length?null:(a=Cd(a,/[^ \t\n]*/gm))?a[0]:null}
function Fd(a){a=Cd(a,Hd);if(a==null)return null;var b=Number(a[2]),c=Number(a[3]);return b>59||c>59?null:(Number(a[6])||0)/1E3+c+b*60+(Number(a[1])||0)*3600}function Id(a){return a?Fd(new Ad(a)):null}var Hd=/(?:(\d{1,}):)?(\d{2}):(\d{2})((\.(\d{1,3})))?/g;function Jd(){}function Kd(a){function b(d){switch(typeof d){case "undefined":case "boolean":case "number":case "string":case "symbol":case "function":return d;default:if(!d||ArrayBuffer.isView(d))return d;if(c.has(d))return null;var e=Array.isArray(d);if(d.constructor!=Object&&!e)return null;c.add(d);var f=e?[]:{},g;for(g in d)f[g]=b(d[g]);e&&(f.length=d.length);return f}}var c=new WeakSet;return b(a)}function Ld(a){var b={},c;for(c in a)b[c]=a[c];return b}
function Md(a){if(Array.isArray(a)){for(var b=[],c=0;c<a.length;c++){var d=c.toString(),e=a[c];e!==void 0&&(e=Md(e))&&b.push(d+":"+e)}a="["+b.join(",")+"]"}else if(typeof a=="function")a="";else if(a instanceof Object){c=Object.keys(a);c.sort();b=[];c=u(c);for(d=c.next();!d.done;d=c.next())e=d.value,d=JSON.stringify(e),e=a[e],e!==void 0&&(e=Md(e))&&b.push(d+":"+e);a="{"+b.join(",")+"}"}else a=JSON.stringify(a);return a}S("shaka.util.ObjectUtils",Jd);Jd.alphabeticalKeyOrderStringify=Md;
Jd.shallowCloneObject=Ld;Jd.cloneObject=Kd;/*
 @license
 tXml
 Copyright 2015 Tobias Nickel
 SPDX-License-Identifier: MIT
*/
function Nd(a,b){var c=c===void 0?!1:c;a=ac(a);return Od(a,b,c)}function Od(a,b,c){a=Pd(a,c===void 0?!1:c);return!b&&a.length?a[0]:(a=a.find(function(d){return b.split(",").includes(d.tagName)}))?a:null}function Qd(a){return Rd.has(a)?Rd.get(a):""}
function Pd(a,b){function c(f,g){g=g===void 0?!1:g;for(var h=[];a[e];)if(a.charCodeAt(e)==60){if(a.charCodeAt(e+1)===47){g=e+2;e=a.indexOf(">",e);g=a.substring(g,e);var k=g.indexOf(f);if(k==-1){var l=f.indexOf(".");l>0&&(k=g.indexOf(f.substring(0,l)))}if(k==-1)throw f=a.substring(0,e).split("\n"),Error("Unexpected close tag\nLine: "+(f.length-1)+"\nColumn: "+(f[f.length-1].length+1)+"\nChar: "+a[e]);e+1&&(e+=1);break}else if(a.charCodeAt(e+1)===33){if(a.charCodeAt(e+2)==45){for(;e!==-1&&(a.charCodeAt(e)!==
62||a.charCodeAt(e-1)!=45||a.charCodeAt(e-2)!=45||e==-1);)e=a.indexOf(">",e+1);e===-1&&(e=a.length)}else if(a.charCodeAt(e+2)===91&&a.charCodeAt(e+8)===91&&a.substr(e+3,5).toLowerCase()==="cdata"){k=a.indexOf("]]\x3e",e);k==-1?(h.push(a.substr(e+9)),e=a.length):(h.push(a.substring(e+9,k)),e=k+3);continue}e++;continue}a:{l=g;e++;var m=d(),n={};for(k=[];a.charCodeAt(e)!==62&&a[e];){var q=a.charCodeAt(e);if(q>64&&q<91||q>96&&q<123){q=d();for(var r=a.charCodeAt(e);r&&r!==39&&r!==34&&!(r>64&&r<91||r>96&&
r<123)&&r!==62;)e++,r=a.charCodeAt(e);var t=e+1;e=a.indexOf(a[e],t);t=a.slice(t,e);if(r===39||r===34){if(e===-1){l={tagName:m,attributes:n,children:k,parent:null};if(b)for(m=0;m<k.length;m++)typeof k[m]!=="string"&&(k[m].parent=l);k=l;break a}}else t=null,e--;if(q.startsWith("xmlns:")){r=t;var v=q.split(":")[1];Rd.set(r,v);Sd.set(v,r)}m==="tt"&&q==="xml:space"&&t==="preserve"&&(l=!0);n[q]=t}e++}a.charCodeAt(e-1)!==47?(e++,k=c(m,l)):e++;l={tagName:m,attributes:n,children:k,parent:null};m=k.length;
for(n=0;n<m;n++)q=k[n],typeof q!=="string"?b&&(q.parent=l):n==m-1&&q=="\n"&&k.pop();k=l}h.push(k);if(typeof k==="string")break;k.tagName[0]==="?"&&k.children&&(h.push.apply(h,x(k.children)),k.children=[])}else k=e,e=a.indexOf("<",e)-1,e===-2&&(e=a.length),k=a.slice(k,e+1),g?k.length>0&&h.push(k):h.length&&k.length==1&&k[0]=="\n"?h.push(k):k.trim().length>0&&h.push(k),e++;return h}function d(){for(var f=e;"\r\n\t>/= ".indexOf(a[e])===-1&&a[e];)e++;return a.slice(f,e)}var e=0;return c("")}
function Td(a){return typeof a==="string"}function Ud(a){var b=[];if(!a.children)return[];a=u(a.children);for(var c=a.next();!c.done;c=a.next())c=c.value,typeof c!=="string"&&b.push(c);return b}function Vd(a,b){var c=[];if(!a.children)return[];a=u(a.children);for(var d=a.next();!d.done;d=a.next())d=d.value,d.tagName===b&&c.push(d);return c}function Wd(a){if(typeof a==="string")return ec(a);a=a.children.reduce(function(b,c){return typeof c==="string"?b+c:b},"");return a===""?null:ec(a)}
function Xd(a){if(!Array.from(a.children).every(function(b){return typeof b==="string"}))return null;(a=Wd(a))&&(a=a.trim());return a}function Yd(a,b,c){c=c===void 0?[]:c;a.tagName===b&&c.push(a);if(a.children){a=u(a.children);for(var d=a.next();!d.done;d=a.next())Yd(d.value,b,c)}return c}function Zd(a,b){a=Vd(a,b);return a.length!=1?null:a[0]}function $d(a,b,c){a=ae(a,b,c);return a.length!=1?null:a[0]}
function be(a,b,c,d){d=d===void 0?null:d;var e=null;a=a.attributes[b];a!=null&&(e=c(a));return e==null?d:e}function ce(a,b,c){b=Qd(b);return a.attributes[b+":"+c]||null}function ae(a,b,c){var d=Qd(b);b=[];if(a.children)for(c=d?d+":"+c:c,a=u(a.children),d=a.next();!d.done;d=a.next())(d=d.value)&&d.tagName===c&&b.push(d);return b}function de(a,b,c){b=u(b);for(var d=b.next();!d.done;d=b.next())if(d=ce(a,d.value,c))return d;return null}
function ee(a){if(!a)return null;/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(a)&&(a+="Z");a=Date.parse(a);return isNaN(a)?null:a/1E3}function fe(a){if(!a)return null;a=RegExp("^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-9]*)D)?(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$","i").exec(a);if(!a)return null;a=31536E3*Number(a[1]||null)+2592E3*Number(a[2]||null)+86400*Number(a[3]||null)+3600*Number(a[4]||null)+60*Number(a[5]||null)+Number(a[6]||null);return isFinite(a)?a:null}
function ge(a){var b=/([0-9]+)-([0-9]+)/.exec(a);if(!b)return null;a=Number(b[1]);if(!isFinite(a))return null;b=Number(b[2]);return isFinite(b)?{start:a,end:b}:null}function he(a){a=Number(a);return a%1===0?a:null}function ie(a){a=Number(a);return a%1===0&&a>0?a:null}function je(a){a=Number(a);return a%1===0&&a>=0?a:null}function ke(a){a=Number(a);return isNaN(a)?null:a}function le(a){return a?a.toLowerCase()==="true":!1}
function me(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(c)?null:c}
function oe(a){var b=[];a=ec(a).split(/\/+(?=(?:[^'"]*['"][^'"]*['"])*[^'"]*$)/);a=u(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=c.match(/^([\w]+)/);if(d){var e=c.match(/(@id='(.*?)')/),f=c.match(/(@t='(\d+)')/),g=c.match(/(@n='(\d+)')/),h=c.match(/\[(\d+)\]/);b.push({name:d[0],id:e?e[0].match(/'(.*?)'/)[0].replace(/'/gm,""):null,t:f?Number(f[0].match(/'(.*?)'/)[0].replace(/'/gm,"")):null,n:g?Number(g[0].match(/'(.*?)'/)[0].replace(/'/gm,"")):null,position:h?Number(h[1])-1:null,Oc:c.split("/@")[1]||
null})}else c.startsWith("@")&&b.length&&(b[b.length-1].Oc=c.slice(1))}return b}
function pe(a,b){var c=oe(b.attributes.sel||"");if(c.length){var d=c[c.length-1],e=b.attributes.pos||null;c=d.position;c==null&&(d.t!==null&&(c=qe(a,"t",d.t)),d.n!==null&&(c=qe(a,"n",d.n)));c===null?c=e==="prepend"?0:a.length:e==="prepend"?--c:e==="after"&&++c;e=b.tagName;(d=d.Oc)&&a[c]?re(a[c],e,d,Xd(b)||""):(e!=="remove"&&e!=="replace"||a.splice(c,1),e!=="add"&&e!=="replace"||a.splice.apply(a,[c,0].concat(x(b.children))))}}
function qe(a,b,c){var d=0;a=u(a);for(var e=a.next();!e.done;e=a.next()){if(Number(e.value.attributes[b])===c)return d;d++}return null}function re(a,b,c,d){if(b==="remove")delete a.attributes[c];else if(b==="add"||b==="replace")a.attributes[c]=d}
function se(a){var b="",c=a.tagName.split(":");c.length>0&&(b=c[0],b=Sd.has(b)?Sd.get(b):"");b=document.createElementNS(b,a.tagName);for(var d in a.attributes)b.setAttribute(d,a.attributes[d]);a=u(a.children);for(d=a.next();!d.done;d=a.next())d=d.value,c=void 0,typeof d=="string"?c=new Text(d):c=se(d),b.appendChild(c);return b}
function te(a){if(!a)return null;var b={tagName:a.tagName,attributes:Ld(a.attributes),children:[],parent:null};a=u(a.children);for(var c=a.next();!c.done;c=a.next())c=c.value,typeof c==="string"?b.children.push(c):(c=te(c),c.parent=b,b.children.push(c));return b}var Rd=new Map,Sd=new Map;function ue(a,b,c){this.startTime=a;this.endTime=b;this.payload=c;this.region=new xd;this.position=null;this.positionAlign=ve;this.size=0;this.textAlign=we;this.direction=xe;this.writingMode=ye;this.lineInterpretation=ze;this.line=null;this.lineHeight="";this.lineAlign=Ae;this.displayAlign=Be;this.fontSize=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=Ce;this.fontStyle=De;this.linePadding=this.letterSpacing=this.fontFamily="";this.opacity=1;this.textCombineUpright=
"";this.textDecoration=[];this.textStrokeWidth=this.textStrokeColor=this.textShadow="";this.wrapLine=!0;this.id="";this.nestedCues=[];this.lineBreak=this.isContainer=!1;this.rubyTag=null;this.cellResolution={columns:32,rows:15}}function Ee(a,b){a=new ue(a,b,"");a.lineBreak=!0;return a}ue.prototype.clone=function(){var a=new ue(0,0,""),b;for(b in this)a[b]=this[b],Array.isArray(a[b])&&(a[b]=a[b].slice());return a};
function Fe(a,b){if(a.payload!=b.payload||!(Math.abs(a.startTime-b.startTime)<.001&&Math.abs(a.endTime-b.endTime)<.001))return!1;for(var c in a)if(c!="startTime"&&c!="endTime"&&c!="payload")if(c=="nestedCues"){if(!Vc(a.nestedCues,b.nestedCues,Fe))return!1}else if(c=="region"||c=="cellResolution")for(var d in a[c]){if(a[c][d]!=b[c][d])return!1}else if(Array.isArray(a[c])){if(!Vc(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}
function Ge(a,b){b=b===void 0?new Map:b;var c=a.payload;if(c.includes("<")){b.size===0&&He(b);var d=c;c=[];for(var e=-1,f=0;f<d.length;f++)d[f]==="<"?e=f+1:d[f]===">"&&e>0&&(e=d.substr(e,f-e),e.match(Ie)&&c.push(e),e=-1);c=u(c);for(f=c.next();!f.done;f=c.next())f=f.value,d=d.replace("<"+f+">",'<div time="'+f+'">'),d+="</div>";a:{f=d;e=[];var g=-1;c="";d=!1;for(var h=0;h<f.length;h++)if(f[h]==="/"){var k=f.indexOf(">",h);if(k===-1){c=f;break a}if((k=f.substring(h+1,k))&&k=="v"){d=!0;var l=null;e.length&&
(l=e[e.length-1]);if(l){if(l===k)c+="/"+k+">";else{if(!l.startsWith("v")){c+=f[h];continue}c+="/"+l+">"}h+=k.length+1}else c+=f[h]}else c+=f[h]}else f[h]==="<"?(g=h+1,f[g]!="v"&&(g=-1)):f[h]===">"&&g>0&&(e.push(f.substr(g,h-g)),g=-1),c+=f[h];f=u(e);for(e=f.next();!e.done;e=f.next())e=e.value,g=e.replace(" ",".voice-"),c=c.replace("<"+e+">","<"+g+">"),c=c.replace("</"+e+">","</"+g+">"),d||(c+="</"+g+">")}c=Je(c);a.payload="";d="<span>"+c.replace(/\n/g,"<br />")+"</span>";try{var m=Od(d,"span")}catch(n){}if(m)if(m=
m.children,m.length!=1||m[0].tagName)for(m=u(m),c=m.next();!c.done;c=m.next())Ke(c.value,a,b);else a.payload=ec(c);else a.payload=ec(c)}else a.payload=ec(c)}function He(a){for(var b=u(Object.entries(Le)),c=b.next();!c.done;c=b.next()){var d=u(c.value);c=d.next().value;d=d.next().value;var e=new ue(0,0,"");e.color=d;a.set("."+c,e)}b=u(Object.entries(Me));for(c=b.next();!c.done;c=b.next())d=u(c.value),c=d.next().value,d=d.next().value,e=new ue(0,0,""),e.backgroundColor=d,a.set("."+c,e)}
function Je(a){var b={"< ":""," >":" &gt;"},c=/(< +>|<\s|\s>)/g,d=RegExp(c.source);return a&&d.test(a)?a.replace(c,function(e){return b[e]||""}):a||""}
function Ke(a,b,c){var d=b.clone();d.nestedCues=[];d.payload="";d.rubyTag="";d.line=null;d.region=new xd;d.position=null;d.size=0;d.textAlign=we;if(a.tagName)for(var e=u(a.tagName.split(/(?=[ .])+/g)),f=e.next();!f.done;f=e.next()){var g=f=f.value;if(g.startsWith(".voice-")){var h=g.split("-").pop();g='v[voice="'+h+'"]';c.has(g)||(g="v[voice="+h+"]")}c.has(g)&&(h=d,g=c.get(g))&&(h.backgroundColor=Oe(g.backgroundColor,h.backgroundColor),h.color=Oe(g.color,h.color),h.fontFamily=Oe(g.fontFamily,h.fontFamily),
h.fontSize=Oe(g.fontSize,h.fontSize),h.textShadow=Oe(g.textShadow,h.textShadow),h.fontWeight=g.fontWeight,h.fontStyle=g.fontStyle,h.opacity=g.opacity,h.rubyTag=g.rubyTag,h.textCombineUpright=g.textCombineUpright,h.wrapLine=g.wrapLine);switch(f){case "br":d=Ee(d.startTime,d.endTime);b.nestedCues.push(d);return;case "b":d.fontWeight=Re;break;case "i":d.fontStyle=Se;break;case "u":d.textDecoration.push(Te);break;case "font":if(f=a.attributes.color)d.color=f;break;case "div":f=a.attributes.time;if(!f)break;
if(f=Id(f))d.startTime=f;break;case "ruby":case "rp":case "rt":d.rubyTag=f}}e=a.children;if(Td(a)||e.length==1&&Td(e[0]))for(c=Wd(a).split("\n"),a=!0,c=u(c),e=c.next();!e.done;e=c.next())e=e.value,a||(a=Ee(d.startTime,d.endTime),b.nestedCues.push(a)),e.length>0&&(a=d.clone(),a.payload=ec(e),b.nestedCues.push(a)),a=!1;else for(b.nestedCues.push(d),b=u(e),a=b.next();!a.done;a=b.next())Ke(a.value,d,c)}function Oe(a,b){return a&&a.length>0?a:b}S("shaka.text.Cue",ue);ue.parseCuePayload=Ge;ue.equal=Fe;
ue.prototype.clone=ue.prototype.clone;var ve="auto";ue.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:ve};var we="center",Ue={LEFT:"left",RIGHT:"right",CENTER:we,START:"start",END:"end"};ue.textAlign=Ue;var Be="after",Ve={BEFORE:"before",CENTER:"center",AFTER:Be};ue.displayAlign=Ve;var xe="ltr";ue.direction={HORIZONTAL_LEFT_TO_RIGHT:xe,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var ye="horizontal-tb";ue.writingMode={HORIZONTAL_TOP_TO_BOTTOM:ye,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};
var ze=0;ue.lineInterpretation={LINE_NUMBER:ze,PERCENTAGE:1};var Ae="start",We={CENTER:"center",START:Ae,END:"end"};ue.lineAlign=We;var Le={white:"white",lime:"lime",cyan:"cyan",red:"red",yellow:"yellow",magenta:"magenta",blue:"blue",black:"black"};ue.defaultTextColor=Le;var Me={bg_white:"white",bg_lime:"lime",bg_cyan:"cyan",bg_red:"red",bg_yellow:"yellow",bg_magenta:"magenta",bg_blue:"blue",bg_black:"black"};ue.defaultTextBackgroundColor=Me;var Ce=400,Re=700;ue.fontWeight={NORMAL:Ce,BOLD:Re};
var De="normal",Se="italic",Xe={NORMAL:De,ITALIC:Se,OBLIQUE:"oblique"};ue.fontStyle=Xe;var Te="underline";ue.textDecoration={UNDERLINE:Te,LINE_THROUGH:"lineThrough",OVERLINE:"overline"};var Ie=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;function Ye(){}Ye.prototype.destroy=function(){};function Ze(a,b,c){$e.set(a.toLowerCase().split(";")[0]+"-"+c,{priority:c,Xf:b})}function af(a,b){for(var c=a.toLowerCase().split(";")[0],d=u([bf,cf,df,ef]),e=d.next();!e.done;e=d.next())if(e=$e.get(c+"-"+e.value)){var f=e.Xf(),g=f.isSupported(a,b);f.destroy();if(g)return e.Xf}return null}S("shaka.transmuxer.TransmuxerEngine",Ye);Ye.findTransmuxer=af;Ye.unregisterTransmuxer=function(a,b){$e.delete(a.toLowerCase().split(";")[0]+"-"+b)};
Ye.registerTransmuxer=Ze;Ye.prototype.destroy=Ye.prototype.destroy;var $e=new Map,ef=1,df=2,cf=3,bf=4;Ye.PluginPriority={FALLBACK:ef,PREFERRED_SECONDARY:df,PREFERRED:cf,APPLICATION:bf};function ff(){}function gf(a,b){var c=a;b&&!hf.includes(a)&&(c+='; codecs="'+b+'"');return c}function jf(a,b){b&&(a+='; codecs="'+b+'"');return a}function kf(a,b,c){var d=gf(a,b);b=jf(a,b);af(b)?(a=af(b))?(a=a(),c=a.convertCodecs(c,b),a.destroy()):c=b:c=a!="video/mp2t"&&c=="audio"?d.replace("video","audio"):d;return c}function lf(a){return a.split(";")[0].split("/")[1]}
function mf(a){var b=nf(a);a=b[0].toLowerCase();b=b[1].toLowerCase();switch(!0){case a==="mp4a"&&b==="69":case a==="mp4a"&&b==="6b":case a==="mp4a"&&b==="40.34":return"mp3";case a==="mp4a"&&b==="66":case a==="mp4a"&&b==="67":case a==="mp4a"&&b==="68":case a==="mp4a"&&b==="40.2":case a==="mp4a"&&b==="40.02":case a==="mp4a"&&b==="40.5":case a==="mp4a"&&b==="40.05":case a==="mp4a"&&b==="40.29":case a==="mp4a"&&b==="40.42":return"aac";case a==="mp4a"&&b==="a5":case a==="ac3":case a==="ac-3":return"ac-3";
case a==="mp4a"&&b==="a6":case a==="eac3":case a==="ec-3":return"ec-3";case a==="ac-4":return"ac-4";case a==="mp4a"&&b==="b2":return"dtsx";case a==="mp4a"&&b==="a9":return"dtsc";case a==="vp09":case a==="vp9":return"vp9";case a==="avc1":case a==="avc3":return"avc";case a==="hvc1":case a==="hev1":return"hevc";case a==="vvc1":case a==="vvi1":return"vvc";case a==="dvh1":case a==="dvhe":return b&&b.startsWith("05")?"dovi-p5":"dovi-hevc";case a==="dvav":case a==="dva1":return"dovi-avc";case a==="dav1":return"dovi-av1";
case a==="dvc1":case a==="dvi1":return"dovi-vvc";case a==="lvc1":return"lcevc"}return a}function of(a){var b=[];a=u(a.split(","));for(var c=a.next();!c.done;c=a.next())c=nf(c.value),b.push(c[0]);return b.sort().join(",")}function pf(a){return a.split(";")[0]}function qf(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}function rf(a){return a==="application/x-mpegurl"||a==="application/vnd.apple.mpegurl"}
function nf(a){a=a.split(".");var b=a[0];a.shift();return[b,a.join(".")]}S("shaka.util.MimeUtils",ff);ff.getFullTypeWithAllCodecs=jf;ff.getFullType=gf;(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");var hf=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function sf(a){this.i=null;this.l=a;this.D=!1;this.m=this.A=0;this.u=Infinity;this.h=this.g=null;this.F="";this.C=function(){};this.j=new Map}function tf(a,b){uf.set(a,b)}function vf(a){return uf.get(a)}function wf(a){return uf.has(a)?!0:a=="application/cea-608"||a=="application/cea-708"?!!ud:!1}sf.prototype.destroy=function(){this.l=this.i=null;this.j.clear();return Promise.resolve()};
function xf(a,b,c,d,e){var f,g,h,k,l,m,n;return Q(function(q){if(q.g==1)return E(q,Promise.resolve(),2);if(!a.i||!a.l)return q.return();if(c==null||d==null)return a.i.parseInit(Lb(b)),q.return();f=a.D?c:a.A;g={periodStart:a.A,segmentStart:c,segmentEnd:d,vttOffset:f};h=a.i.parseMedia(Lb(b),g,e,[]);k=u(h);for(l=k.next();!l.done;l=k.next())m=l.value,a.C(m,e||null,g);n=h.filter(function(r){return r.startTime>=a.m&&r.startTime<a.u});a.l.append(n);a.g==null&&(a.g=Math.max(c,a.m));a.h=Math.min(d,a.u);H(q)})}
sf.prototype.remove=function(a,b,c){c=c===void 0?!1:c;var d=this;return Q(function(e){if(e.g==1)return E(e,Promise.resolve(),2);if(a>=b)return e.return();c&&zf(d,a,b);d.l&&d.l.remove(a,b)&&d.g!=null&&(b<=d.g||a>=d.h||(a<=d.g&&b>=d.h?d.g=d.h=null:a<=d.g&&b<d.h?d.g=b:a>d.g&&b>=d.h&&(d.h=a)),Af(d));H(e)})};function Bf(a,b,c){a.m=b;a.u=c}function Cf(a,b,c){a.F=b;if(b=a.j.get(b))b=b.filter(function(d){return d.endTime<=c}),b.length&&a.l.append(b)}
function Df(a,b,c){b.startTime+=c;b.endTime+=c;b=u(b.nestedCues);for(var d=b.next();!d.done;d=b.next())Df(a,d.value,c)}
function Ef(a,b,c){var d=new Map;b=u(b);for(var e=b.next();!e.done;e=b.next()){var f=e.value;e=f.stream;f=f.cue;d.has(e)||d.set(e,[]);Df(a,f,c);f.startTime>=a.m&&f.startTime<a.u&&(d.get(e).push(f),e==a.F&&a.l.append([f]))}c=u(d.keys());for(b=c.next();!b.done;b=c.next())for(b=b.value,a.j.has(b)||a.j.set(b,[]),e=u(d.get(b)),f=e.next();!f.done;f=e.next())f=f.value,a.j.get(b).push(f);Af(a)}
function zf(a,b,c){for(var d=u(a.j.keys()),e=d.next();!e.done;e=d.next()){e=e.value;var f=a.j.get(e);f=f.filter(function(g){return g.startTime<b||g.endTime>=c});a.j.set(e,f)}}
function Af(a){for(var b=Infinity,c=-Infinity,d=u(a.j.values()),e=d.next();!e.done;e=d.next()){e=u(e.value);for(var f=e.next();!f.done;f=e.next())f=f.value,b=Math.min(b,f.startTime),c=Math.max(c,f.endTime)}b!==Infinity&&c!==-Infinity&&(a.g=a.g==null?Math.max(b,a.m):Math.min(a.g,Math.max(b,a.m)),a.h=Math.max(a.h,Math.min(c,a.u)))}S("shaka.text.TextEngine",sf);sf.prototype.destroy=sf.prototype.destroy;sf.findParser=vf;sf.unregisterParser=function(a){uf.delete(a)};sf.registerParser=tf;var uf=new Map;function Ff(a){this.h=a;this.g=null}Ff.prototype.Y=function(a){var b=this;this.stop();var c=!0,d=null;this.g=function(){window.clearTimeout(d);c=!1};d=window.setTimeout(function(){c&&b.h()},a*1E3);return this};Ff.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function Gf(a){this.h=a;this.g=null}Gf.prototype.Ka=function(){this.stop();this.h();return this};Gf.prototype.Y=function(a){var b=this;this.stop();this.g=(new Ff(function(){b.h()})).Y(a);return this};Gf.prototype.xa=function(a){var b=this;this.stop();this.g=(new Ff(function(){b.g.Y(a);b.h()})).Y(a);return this};Gf.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};S("shaka.util.Timer",Gf);Gf.prototype.stop=Gf.prototype.stop;Gf.prototype.tickEvery=Gf.prototype.xa;
Gf.prototype.tickAfter=Gf.prototype.Y;Gf.prototype.tickNow=Gf.prototype.Ka;function Hf(a,b){return a.concat(b)}function If(){}function Jf(a){return a!=null}function Kf(a,b){return Promise.race([b,new Promise(function(c,d){(new Gf(d)).Y(a)})])};function Lf(){}
function Mf(a,b,c,d,e){function f(z){var y=String(z.width||"")+String(z.height||"")+String(Math.round(z.frameRate||0))+(z.hdr||"")+z.fastSwitching;z.dependencyStream&&(y+=z.dependencyStream.baseOriginalId||"");z.roles&&(y+=z.roles.sort().join("_"));return y}function g(z){var y=z.language+(z.channelsCount||0)+(z.audioSamplingRate||0)+z.roles.join(",")+z.label+z.groupId+z.fastSwitching;z.dependencyStream&&(y+=z.dependencyStream.baseOriginalId||"");return y}if(e.length){var h=a.textStreams;e=u(e);for(var k=
e.next(),l={};!k.done;l={si:void 0},k=e.next())if(l.si=k.value,k=h.filter(function(z){return function(y){return y.codecs.startsWith(z.si)||y.mimeType.startsWith(z.si)?!0:!1}}(l)),k.length){h=k;break}a.textStreams=h}h=a.variants;if(b.length||c.length)h=Nf(h,b,c);if(d.length){b=new lb;c=u(h);for(h=c.next();!h.done;h=c.next())h=h.value,b.push(String(h.video.width||0),h);var m=[];b.forEach(function(z,y){z=0;var A=[];y=u(y);for(var C=y.next(),F={};!C.done;F={zg:void 0},C=y.next())F.zg=C.value,C=d.filter(function(D){return function(B){return D.zg.decodingInfos[0][B]}}(F)).length,
C>z?(z=C,A=[F.zg]):C==z&&A.push(F.zg);m.push.apply(m,x(A))});h=m}c=new Set;b=new Set;h=u(h);for(e=h.next();!e.done;e=h.next())e=e.value,e.audio&&c.add(e.audio),e.video&&b.add(e.video);h=Array.from(c).sort(function(z,y){return z.bandwidth-y.bandwidth});var n=[];c=new Map;h=u(h);for(e=h.next();!e.done;e=h.next()){e=e.value;k=g(e);l=c.get(k)||[];if(l.length){var q=l[l.length-1],r=mf(q.codecs),t=mf(e.codecs);r!=t||e.bandwidth&&q.bandwidth&&!(e.bandwidth>q.bandwidth)||(l.push(e),n.push(e.id))}else l.push(e),
n.push(e.id);c.set(k,l)}var v={vp8:1,avc:1,"dovi-avc":.95,vp9:.9,vp09:.9,hevc:.85,"dovi-hevc":.8,"dovi-p5":.75,av01:.7,"dovi-av1":.65,vvc:.6};h=Array.from(b).sort(function(z,y){if(!z.bandwidth||!y.bandwidth||z.bandwidth==y.bandwidth){if(z.codecs&&y.codecs&&z.codecs!=y.codecs&&z.width==y.width){var A=mf(z.codecs),C=mf(y.codecs);if(A!=C)return(v[A]||1)-(v[C]||1)}return z.width-y.width}return z.bandwidth-y.bandwidth});b=md();var w=[];c=new Map;h=u(h);for(e=h.next();!e.done;e=h.next()){e=e.value;k=f(e);
l=c.get(k)||[];if(l.length){q=l[l.length-1];if(!b&&(r=mf(q.codecs),t=mf(e.codecs),r!==t))continue;r=mf(q.codecs);t=mf(e.codecs);r!=t||e.bandwidth&&q.bandwidth&&!(e.bandwidth>q.bandwidth)||(l.push(e),w.push(e.id))}else l.push(e),w.push(e.id);c.set(k,l)}a.variants=a.variants.filter(function(z){var y=z.audio;z=z.video;return y&&!n.includes(y.id)||z&&!w.includes(z.id)?!1:!0})}
function Nf(a,b,c){b=u(b);for(var d=b.next(),e={};!d.done;e={videoCodec:void 0},d=b.next())if(e.videoCodec=d.value,d=a.filter(function(f){return function(g){return g.video&&g.video.codecs.startsWith(f.videoCodec)}}(e)),d.length){a=d;break}c=u(c);b=c.next();for(d={};!b.done;d={audioCodec:void 0},b=c.next())if(d.audioCodec=b.value,b=a.filter(function(f){return function(g){return g.audio&&g.audio.codecs.startsWith(f.audioCodec)}}(d)),b.length){a=b;break}return a}
function Of(a,b,c){a.variants=a.variants.filter(function(d){return Pf(d,b,c)})}
function Pf(a,b,c){function d(h,k,l){return h>=k&&h<=l}var e=a.video;if(e&&e.width&&e.height){var f=e.width,g=e.height;g>f&&(g=u([g,f]),f=g.next().value,g=g.next().value);if(!d(f,b.minWidth,Math.min(b.maxWidth,c.width))||!d(g,b.minHeight,Math.min(b.maxHeight,c.height))||!d(e.width*e.height,b.minPixels,b.maxPixels))return!1}return a&&a.video&&a.video.frameRate&&!d(a.video.frameRate,b.minFrameRate,b.maxFrameRate)||a&&a.audio&&a.audio.channelsCount&&!d(a.audio.channelsCount,b.minChannelsCount,b.maxChannelsCount)||
!d(a.bandwidth,b.minBandwidth,b.maxBandwidth)?!1:!0}function Qf(a,b,c,d){c=c===void 0?[]:c;d=d===void 0?{}:d;return Q(function(e){if(e.g==1)return E(e,Rf(a,b,b.offlineSessionIds.length>0,c,d),2);Sf(b);return E(e,Tf(b),0)})}
function Rf(a,b,c,d,e){var f,g;return Q(function(h){if(h.g==1)return Tb().Wj()&&Uf(b.variants),E(h,Vf(b.variants,c,!1,d),2);f=null;a&&(g=a.h)&&(f=g.keySystem);b.variants=b.variants.filter(function(k){var l=Wf(k,f,e);if(!l){var m=[];k.audio&&m.push(Xf(k.audio));k.video&&m.push(Xf(k.video))}return l});H(h)})}
function Uf(a){var b=(new Map).set("dvav","avc3").set("dva1","avc1").set("dvhe","hev1").set("dvh1","hvc1").set("dvc1","vvc1").set("dvi1","vvi1"),c=new Set;a=u(a);for(var d=a.next();!d.done;d=a.next())d=d.value,d.video&&c.add(d.video);c=u(c);for(a=c.next();!a.done;a=c.next()){a=a.value;d=u(b);for(var e=d.next();!e.done;e=d.next()){var f=u(e.value);e=f.next().value;f=f.next().value;if(a.codecs.includes(e)){a.codecs=a.codecs.replace(e,f);break}}}}
function Wf(a,b,c){if(!a.decodingInfos.some(function(k){return!k.supported||b&&(k=k.keySystemAccess)&&(c[k.keySystem]||k.keySystem)!=b?!1:!0}))return!1;var d=Tb(),e=d.Wb()==="Xbox";d=d.Oa()==="MOBILE"&&d.Ja()==="GECKO";var f=a.video,g=f&&f.width||0,h=f&&f.height||0;if(e&&f&&(g>1920||h>1080)&&(f.codecs.includes("avc1.")||f.codecs.includes("avc3."))||(e=f&&f.dependencyStream)&&!id(e))return!1;a=a.audio;return d&&a&&a.encrypted&&a.codecs.toLowerCase().includes("opus")||a&&a.dependencyStream?!1:!0}
function Yf(a,b){var c,d,e,f,g,h,k;return Q(function(l){if(l.g==1){c=function(m,n){if(m){var q=Ld(m);q.supported=m.supported&&n.supported;q.powerEfficient=m.powerEfficient&&n.powerEfficient;q.smooth=m.smooth&&n.smooth;n.keySystemAccess&&!q.keySystemAccess&&(q.keySystemAccess=n.keySystemAccess);return q}return n};d=null;e=[];f=u(b);g=f.next();for(h={};!g.done;h={cache:void 0,lf:void 0},g=f.next())k=g.value,h.lf=Md(k),h.cache=Zf,h.cache.has(h.lf)?d=c(d,h.cache.get(h.lf)):e.push($f(k).then(function(m){return function(n){var q=
null;n=u(n||[]);for(var r=n.next();!r.done;r=n.next())q=c(q,r.value);q&&(m.cache.set(m.lf,q),d=c(d,q))}}(h)));return E(l,Promise.all(e),2)}d&&a.decodingInfos.push(d);H(l)})}
function $f(a){var b=[""];a.video&&(b=qf(a.video.contentType).split(","));var c=[""];a.audio&&(c=qf(a.audio.contentType).split(","));var d=[];b=u(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;for(var f=u(c),g=f.next(),h={};!g.done;h={gd:void 0},g=f.next())g=g.value,h.gd=Kd(a),a.video&&(h.gd.video.contentType=gf(pf(h.gd.video.contentType),e)),a.audio&&(h.gd.audio.contentType=gf(pf(h.gd.audio.contentType),g)),d.push(new Promise(function(k){return function(l,m){(Tb().Oa()=="MOBILE"?Kf(5,navigator.mediaCapabilities.decodingInfo(k.gd)):
navigator.mediaCapabilities.decodingInfo(k.gd)).then(function(n){l(n)}).catch(m)}}(h)))}return Promise.all(d).catch(function(){JSON.stringify(a);return null})}
function Vf(a,b,c,d){var e,f,g,h,k,l,m,n,q,r,t,v,w,z,y,A,C,F,D;return Q(function(B){switch(B.g){case 1:if(e=a.some(function(G){return G.decodingInfos.length}))return B.return();f=u(d);g=f.next();h={};case 2:if(g.done){B.B(4);break}h.yj=g.value;k=!1;l=u(a);m=l.next();case 5:if(m.done){B.B(7);break}n=m.value;q=ag(n,b,c).filter(function(G){return function(K){K=K[0];return(K.keySystemConfiguration&&K.keySystemConfiguration.keySystem)===G.yj}}(h));r=u(q);t=r.next();case 8:if(t.done){B.B(10);break}v=t.value;
return E(B,Yf(n,v),9);case 9:t=r.next();B.B(8);break;case 10:n.decodingInfos.some(function(G){return G.supported})&&(k=!0);m=l.next();B.B(5);break;case 7:if(k)return B.return();h={yj:void 0};g=f.next();B.B(2);break;case 4:w=u(a),z=w.next();case 12:if(z.done){B.B(0);break}y=z.value;A=ag(y,b,c).filter(function(G){G=G[0];G=G.keySystemConfiguration&&G.keySystemConfiguration.keySystem;return!G||!d.includes(G)});C=u(A);F=C.next();case 15:if(F.done){z=w.next();B.B(12);break}D=F.value;return E(B,Yf(y,D),
16);case 16:F=C.next(),B.B(15)}})}
function ag(a,b,c){var d=a.audio,e=a.video,f=[],g=[];if(e)for(var h=u(e.fullMimeTypes),k=h.next();!k.done;k=h.next()){k=k.value;var l=qf(k);if(l.includes(",")&&!d){var m=l.split(","),n=pf(k);l=sc("video",m);m=sc("audio",m);m=bg(m,n);n=kf(n,m,"audio");g.push({contentType:n,channels:2,bitrate:a.bandwidth||1,samplerate:1,spatialRendering:!1})}l=cg(l);k={contentType:kf(pf(k),l,"video"),width:e.width||64,height:e.height||64,bitrate:e.bandwidth||a.bandwidth||1,framerate:e.frameRate||30};if(e.hdr)switch(e.hdr){case "PQ":k.transferFunction=
"pq";break;case "HLG":k.transferFunction="hlg"}e.colorGamut&&(k.colorGamut=e.colorGamut);f.push(k)}if(d)for(h=u(d.fullMimeTypes),k=h.next();!k.done;k=h.next())l=k.value,k=pf(l),l=bg(qf(l),k),k=kf(k,l,"audio"),g.push({contentType:k,channels:d.channelsCount||2,bitrate:d.bandwidth||a.bandwidth||1,samplerate:d.audioSamplingRate||1,spatialRendering:d.spatialAudio});h=[];f.length==0&&f.push(null);g.length==0&&g.push(null);f=u(f);for(k=f.next();!k.done;k=f.next())for(k=k.value,l=u(g),n=l.next();!n.done;n=
l.next())n=n.value,m={type:c?"file":"media-source"},k&&(m.video=k),n&&(m.audio=n),h.push(m);g=(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[]);if(!g.length)return[h];a=[];c=new Map;g=u(g);for(f=g.next();!f.done;f=g.next())f=f.value,c.get(f.keySystem)||c.set(f.keySystem,[]),c.get(f.keySystem).push(f);g=b?"required":"optional";b=b?["persistent-license"]:["temporary"];f=u(c.keys());for(k=f.next();!k.done;k=f.next()){k=k.value;n=c.get(k);l=new Map;n=u(n);for(m=n.next();!m.done;m=n.next()){m=
m.value;var q=m.videoRobustness+","+m.audioRobustness;l.get(q)||l.set(q,[]);l.get(q).push(m)}l=u(l.values());for(n=l.next();!n.done;n=l.next()){n=n.value;m=[];q=u(h);for(var r=q.next();!r.done;r=q.next()){r=Object.assign({},r.value);for(var t={keySystem:k,initDataType:"cenc",persistentState:g,distinctiveIdentifier:"optional",sessionTypes:b},v=u(n),w=v.next();!w.done;w=v.next()){w=w.value;if(w.initData&&w.initData.length){for(var z=new Set,y=u(w.initData),A=y.next();!A.done;A=y.next())z.add(A.value.initDataType);
t.initDataType=w.initData[0].initDataType}w.distinctiveIdentifierRequired&&(t.distinctiveIdentifier="required");w.persistentStateRequired&&(t.persistentState="required");w.sessionType&&(t.sessionTypes=[w.sessionType]);d&&(t.audio?(w.encryptionScheme&&(t.audio.encryptionScheme=t.audio.encryptionScheme||w.encryptionScheme),t.audio.robustness=t.audio.robustness||w.audioRobustness):(t.audio={robustness:w.audioRobustness},w.encryptionScheme&&(t.audio.encryptionScheme=w.encryptionScheme)),t.audio.robustness==
""&&delete t.audio.robustness);e&&(t.video?(w.encryptionScheme&&(t.video.encryptionScheme=t.video.encryptionScheme||w.encryptionScheme),t.video.robustness=t.video.robustness||w.videoRobustness):(t.video={robustness:w.videoRobustness},w.encryptionScheme&&(t.video.encryptionScheme=w.encryptionScheme)),t.video.robustness==""&&delete t.video.robustness)}r.keySystemConfiguration=t;m.push(r)}a.push(m)}}return a}
function bg(a,b){var c=Tb();return a.toLowerCase()=="flac"?c.Ja()!="WEBKIT"?"flac":"fLaC":a.toLowerCase()==="opus"?c.Ja()!="WEBKIT"?"opus":lf(b)=="mp4"?"Opus":"opus":a.toLowerCase()=="ac-3"&&c.Ie()?"ec-3":a}function cg(a){if(a.includes("avc1")){var b=a.split(".");if(b.length==3)return a=b.shift()+".",a+=parseInt(b.shift(),10).toString(16),a+=("000"+parseInt(b.shift(),10).toString(16)).slice(-4)}else if(a=="vp9")return"vp09.00.41.08";return a}
function Sf(a){a.textStreams=a.textStreams.filter(function(b){b=gf(b.mimeType,b.codecs);return wf(b)})}
function Tf(a){var b,c,d,e,f,g,h,k;return Q(function(l){switch(l.g){case 1:b=[],c=u(a.imageStreams),d=c.next();case 2:if(d.done){l.B(4);break}e=d.value;f=e.mimeType;f=="application/mp4"&&e.codecs=="mjpg"&&(f="image/jpg");if(dg.has(f)){l.B(5);break}g=eg.get(f);if(!g){dg.set(f,!1);l.B(5);break}return E(l,fg(g),7);case 7:h=l.h,dg.set(f,h);case 5:(k=dg.get(f))&&b.push(e);d=c.next();l.B(2);break;case 4:a.imageStreams=b,H(l)}})}
function fg(a){return new Promise(function(b){var c=new Image;c.src=a;"decode"in c?c.decode().then(function(){b(!0)}).catch(function(){b(!1)}):c.onload=c.onerror=function(){b(c.height===2)}})}
function gg(a){var b=a.audio,c=a.video,d=b?b.mimeType:null,e=c?c.mimeType:null,f=b?b.codecs:null,g=c?c.codecs:null,h=b?b.groupId:null,k=[];c&&k.push(c.mimeType);b&&k.push(b.mimeType);k=k[0]||null;var l=[];b&&l.push(b.kind);c&&l.push(c.kind);l=l[0]||null;var m=new Set;if(b)for(var n=u(b.roles),q=n.next();!q.done;q=n.next())m.add(q.value);if(c)for(n=u(c.roles),q=n.next();!q.done;q=n.next())m.add(q.value);a={id:a.id,active:!1,type:"variant",bandwidth:a.bandwidth,language:a.language,label:null,videoLabel:null,
kind:l,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,colorGamut:null,videoLayout:null,mimeType:k,audioMimeType:d,videoMimeType:e,codecs:"",audioCodec:f,videoCodec:g,primary:a.primary,roles:Array.from(m),audioRoles:null,videoRoles:null,forced:!1,videoId:null,audioId:null,audioGroupId:h,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:null,
accessibilityPurpose:null,originalLanguage:null};if(c){a.videoId=c.id;a.originalVideoId=c.originalId;a.width=c.width||null;a.height=c.height||null;a.frameRate=c.frameRate||null;a.pixelAspectRatio=c.pixelAspectRatio||null;a.videoBandwidth=c.bandwidth||null;a.hdr=c.hdr||null;a.colorGamut=c.colorGamut||null;a.videoLayout=c.videoLayout||null;a.videoRoles=c.roles;a.videoLabel=c.label;if(d=c.dependencyStream)a.width=d.width||a.width,a.height=d.height||a.height,a.videoCodec=d.codecs||a.videoCodec,a.videoBandwidth&&
d.bandwidth&&(a.videoBandwidth+=d.bandwidth);if(g.includes(",")){a.channelsCount=c.channelsCount;a.audioSamplingRate=c.audioSamplingRate;a.spatialAudio=c.spatialAudio;a.originalLanguage=c.originalLanguage;a.audioMimeType=e;e=g.split(",");try{a.videoCodec=sc("video",e),a.audioCodec=sc("audio",e)}catch(r){}}}b&&(a.audioId=b.id,a.originalAudioId=b.originalId,a.channelsCount=b.channelsCount,a.audioSamplingRate=b.audioSamplingRate,a.audioBandwidth=b.bandwidth||null,a.spatialAudio=b.spatialAudio,a.label=
b.label,a.audioRoles=b.roles,a.accessibilityPurpose=b.accessibilityPurpose,a.originalLanguage=b.originalLanguage,e=b.dependencyStream)&&(a.audioCodec=e.codecs||a.audioCodec,a.audioBandwidth&&e.bandwidth&&(a.audioBandwidth+=e.bandwidth));c&&!a.videoBandwidth&&(b?a.audioBandwidth&&(a.videoBandwidth=a.bandwidth-a.audioBandwidth):a.videoBandwidth=a.bandwidth);b&&!a.audioBandwidth&&(c?a.videoBandwidth&&(a.audioBandwidth=a.bandwidth-a.videoBandwidth):a.audioBandwidth=a.bandwidth);b=[];a.videoCodec&&b.push(a.videoCodec);
a.audioCodec&&b.push(a.audioCodec);a.codecs=b.join(", ");return a}function hg(a){return{id:a.id,active:!1,type:vc,bandwidth:a.bandwidth||0,language:a.language,label:a.label,kind:a.kind||null,mimeType:a.mimeType,codecs:a.codecs||null,primary:a.primary,roles:a.roles,accessibilityPurpose:a.accessibilityPurpose,forced:a.forced,originalTextId:a.originalId,originalLanguage:a.originalLanguage}}
function ig(a){var b=a.width||null,c=a.height||null,d=null;a.segmentIndex&&(d=jg(a.segmentIndex));var e=a.tilesLayout;d&&(e=d.tilesLayout||e);e&&b!=null&&(b/=Number(e.split("x")[0]));e&&c!=null&&(c/=Number(e.split("x")[1]));return{id:a.id,type:"image",bandwidth:a.bandwidth||0,width:b,height:c,mimeType:a.mimeType,codecs:a.codecs||null,tilesLayout:e||null,originalImageId:a.originalId}}function kg(a){a.__shaka_id||(a.__shaka_id=lg++);return a.__shaka_id}
function mg(a){var b={id:kg(a),active:a.mode!="disabled",type:vc,bandwidth:0,language:Bc(a.language||"und"),label:a.label,kind:a.kind,mimeType:null,codecs:null,primary:!1,roles:[],accessibilityPurpose:null,forced:a.kind=="forced",originalTextId:a.id,originalLanguage:a.language};a.kind=="captions"&&(b.mimeType="unknown");a.kind=="subtitles"&&(b.mimeType="text/vtt");a.kind&&(b.roles=[a.kind]);return b}
function ng(a,b){var c=a?a.language:null;c={id:kg(a||b),active:a?a.enabled:b.selected,type:"variant",bandwidth:0,language:Bc(c||"und"),label:a?a.label:null,videoLabel:null,kind:a?a.kind:null,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,colorGamut:null,videoLayout:null,mimeType:null,audioMimeType:null,videoMimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:a?a.kind=="main":!1,roles:[],forced:!1,audioRoles:null,videoRoles:null,videoId:null,audioId:null,audioGroupId:null,
channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:b?b.id:null,originalAudioId:a?a.id:null,originalTextId:null,originalImageId:null,accessibilityPurpose:null,originalLanguage:c};a&&a.kind&&(c.roles=[a.kind],c.audioRoles=[a.kind]);a&&a.configuration&&(a.configuration.codec&&(c.audioCodec=a.configuration.codec,c.codecs=c.audioCodec),a.configuration.bitrate&&(c.audioBandwidth=a.configuration.bitrate,c.bandwidth+=c.audioBandwidth),
a.configuration.sampleRate&&(c.audioSamplingRate=a.configuration.sampleRate),a.configuration.numberOfChannels&&(c.channelsCount=a.configuration.numberOfChannels));if(b&&b.configuration&&(b.configuration.codec&&(c.videoCodec=b.configuration.codec,c.codecs=c.codecs?c.codecs+(","+c.videoCodec):c.videoCodec),b.configuration.bitrate&&(c.videoBandwidth=b.configuration.bitrate,c.bandwidth+=c.videoBandwidth),b.configuration.framerate&&(c.frameRate=b.configuration.framerate),b.configuration.width&&(c.width=
b.configuration.width),b.configuration.height&&(c.height=b.configuration.height),b.configuration.colorSpace&&b.configuration.colorSpace.transfer))switch(b.configuration.colorSpace.transfer){case "pq":c.hdr="PQ";break;case "hlg":c.hdr="HLG";break;case "bt709":c.hdr="SDR"}return c}function og(a){return a.allowedByApplication&&a.allowedByKeySystem&&a.disabledUntilTime==0}function pg(a){return a.filter(function(b){return og(b)})}
function qg(a,b,c,d){var e=a,f=a.filter(function(k){return k.primary});f.length&&(e=f);var g=e.length?e[0].language:"";e=e.filter(function(k){return k.language==g});if(b){var h=Kc(Bc(b),a.map(function(k){return k.language}));h&&(e=a.filter(function(k){return Bc(k.language)==h}))}e=e.filter(function(k){return k.forced==d});if(c){if(a=rg(e,c),a.length)return a}else if(a=e.filter(function(k){return k.roles.length==0}),a.length)return a;a=e.map(function(k){return k.roles}).reduce(Hf,[]);return a.length?
rg(e,a[0]):e}function rg(a,b){return a.filter(function(c){return c.roles.includes(b)})}function sg(a){var b=[];a.audio&&b.push(a.audio);a.video&&b.push(a.video);return b}
function tg(a,b){b.length&&(b=b.filter(function(c){return mf(a.codecs)==mf(c.codecs)}).sort(function(c,d){return c.bandwidth&&d.bandwidth&&c.bandwidth!=d.bandwidth?c.bandwidth-d.bandwidth:(c.width||0)-(d.width||0)}),a.trickModeVideo=b[0],b.length>1&&(b=b.find(function(c){return a.width==c.width&&a.height==c.height})))&&(a.trickModeVideo=b)}
function Xf(a){return a.type=="audio"?"type=audio codecs="+a.codecs+" bandwidth="+a.bandwidth+" channelsCount="+a.channelsCount+" audioSamplingRate="+a.audioSamplingRate:a.type=="video"?"type=video codecs="+a.codecs+" bandwidth="+a.bandwidth+" frameRate="+a.frameRate+" width="+a.width+" height="+a.height:"unexpected stream type"}
function ug(a,b,c){if(c.autoShowText==0)return!1;if(c.autoShowText==1)return!0;var d=Bc(c.preferredTextLanguage);b=Bc(b.language);if(c.autoShowText==2)return Ac(b,d);if(c.autoShowText==3){if(!a)return!1;a=Bc(a.language);return Ac(b,d)&&!Ac(a,b)}bb("Invalid autoShowText setting!");return!1}
function vg(a){var b={id:0,language:"und",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]};a=u(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d={id:0,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:c?pf(c):"",codecs:c?qf(c):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:"video",primary:!1,trickModeVideo:null,
dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1,baseOriginalId:null};d.fullMimeTypes.add(gf(d.mimeType,d.codecs));c.startsWith("audio/")?(d.type="audio",b.audio=d):b.video=d}return b}S("shaka.util.StreamUtils",Lf);Lf.meetsRestrictions=Pf;
var Zf=new Map,lg=0,dg=(new Map).set("image/svg+xml",!0).set("image/png",!0).set("image/jpeg",!0).set("image/jpg",!0),eg=(new Map).set("image/webp","data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA").set("image/avif","data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=");function wg(){var a=this;this.H=null;this.u=!1;this.C=new Rc;this.j=new Wc;navigator.connection&&navigator.connection.addEventListener&&this.j.o(navigator.connection,"change",function(){if(a.u&&a.g.useNetworkInformation){a.C=new Rc;a.g&&a.C.configure(a.g.advanced);var b=a.chooseVariant();b&&navigator.onLine&&a.H(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch)}});this.l=[];this.I=1;this.J=!1;this.h=this.A=this.g=this.D=null;this.m=new Gf(function(){if(a.u&&(a.g.restrictToElementSize||a.g.restrictToScreenSize)){var b=
a.chooseVariant();b&&a.H(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch)}});this.F=window;"documentPictureInPicture"in window&&this.j.o(window.documentPictureInPicture,"enter",function(){a.F=window.documentPictureInPicture.window;a.m&&a.m.Ka();a.j.ua(a.F,"pagehide",function(){a.F=window;a.m&&a.m.Ka()})});this.G=this.i=null}p=wg.prototype;p.stop=function(){this.H=null;this.u=!1;this.l=[];this.I=1;this.A=this.D=null;this.h&&(this.h.disconnect(),this.h=null);this.m&&this.m.stop();this.G=this.i=null};
p.release=function(){this.stop();this.j.release();this.m=null};p.init=function(a){this.H=a};
p.chooseVariant=function(a){a=a===void 0?!1:a;var b=Infinity,c=Infinity;this.g.restrictToScreenSize&&(c=this.g.ignoreDevicePixelRatio?1:this.F.devicePixelRatio,b=this.F.screen.height*c,c*=this.F.screen.width);if(this.h&&this.g.restrictToElementSize){var d=this.g.ignoreDevicePixelRatio?1:this.F.devicePixelRatio,e=this.A.clientHeight,f=this.A.clientWidth;this.i&&document.pictureInPictureElement&&document.pictureInPictureElement==this.A&&(e=this.i.height,f=this.i.width);b=Math.min(b,e*d);c=Math.min(c,
f*d)}e=this.l.filter(function(l){return l&&!(l.audio&&l.audio.fastSwitching||l.video&&l.video.fastSwitching)});e.length||(e=this.l);d=e;a&&e.length!=this.l.length&&(d=this.l.filter(function(l){return l&&(l.audio&&l.audio.fastSwitching||l.video&&l.video.fastSwitching?!0:!1)}));a=xg(this,this.g.restrictions,d,Infinity,Infinity);if(b!=Infinity||c!=Infinity){a=yg(a);a=u(a);for(e=a.next();!e.done;e=a.next())if(e=e.value,e.height>=b&&e.width>=c){b=e.height;c=e.width;break}a=xg(this,this.g.restrictions,
d,b,c)}b=this.getBandwidthEstimate();d.length&&!a.length&&(a=xg(this,null,d,Infinity,Infinity),a=[a[0]]);c=a[0]||null;for(d=0;d<a.length;d++){e=a[d];var g=isNaN(this.I)?1:Math.abs(this.I);f=g*e.bandwidth/this.g.bandwidthDowngradeTarget;for(var h={bandwidth:Infinity},k=d+1;k<a.length;k++)if(e.bandwidth!=a[k].bandwidth){h=a[k];break}g=g*h.bandwidth/this.g.bandwidthUpgradeTarget;c&&e&&b>=f&&b<=g&&(c.bandwidth!=e.bandwidth||c.bandwidth==e.bandwidth&&c.video&&e.video&&(c.video.width<e.video.width||c.video.height<
e.video.height))&&(c=e)}this.D=Date.now();return c};p.enable=function(){this.u=!0;this.l.length&&this.trySuggestStreams()};p.disable=function(){this.u=!1};p.segmentDownloaded=function(a,b,c,d){var e=a;this.g.removeLatencyFromFirstPacketTime&&d&&d.packetNumber===1&&d.timeToFirstByte&&(e=a-d.timeToFirstByte);e>=this.g.cacheLoadThreshold&&this.C.sample(e,b);c&&this.D!=null&&this.u&&zg(this)};p.trySuggestStreams=function(){this.u&&(this.D=Date.now(),zg(this,!0))};
p.getBandwidthEstimate=function(){var a=this.g.defaultBandwidthEstimate;navigator.connection&&navigator.connection.downlink&&this.g.useNetworkInformation&&(a=navigator.connection.downlink*1E6);if(navigator.connection&&navigator.connection.downlink&&this.g.useNetworkInformation&&this.g.preferNetworkInformationBandwidth)return a;a=this.C.getBandwidthEstimate(a);return this.G?this.G.getBandwidthEstimate(a):a};p.setVariants=function(a){if(Uc(a,this.l))return!1;this.l=a;return!0};
p.playbackRateChanged=function(a){this.I=a};p.setMediaElement=function(a){function b(){c.m.Y(Ag)}var c=this;this.A=a;this.h&&(this.h.disconnect(),this.h=null);this.A&&"ResizeObserver"in window&&(this.h=new ResizeObserver(b),this.h.observe(this.A));this.j.o(a,"enterpictureinpicture",function(d){d.pictureInPictureWindow&&(c.i=d.pictureInPictureWindow,c.j.o(c.i,"resize",b))});this.j.o(a,"leavepictureinpicture",function(){c.i&&c.j.Ea(c.i,"resize",b);c.i=null})};p.setCmsdManager=function(a){this.G=a};
p.configure=function(a){this.g=a;this.C&&this.g&&this.C.configure(this.g.advanced)};function zg(a,b){if(b===void 0||!b){if(!a.J){b=a.C;if(!(b.g>=b.i))return;a.J=!0;a.D-=(a.g.switchInterval-a.g.minTimeToSwitch)*1E3}if(Date.now()-a.D<a.g.switchInterval*1E3)return}b=a.chooseVariant();a.getBandwidthEstimate();b&&a.H(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch)}
function xg(a,b,c,d,e){if(a.G){var f=a.G.Zi();f&&(c=c.filter(function(g){return g.bandwidth&&f?g.bandwidth<=f:!0}))}b&&(c=c.filter(function(g){return Pf(g,b,{width:e,height:d})}));return c.sort(function(g,h){return g.bandwidth-h.bandwidth})}function yg(a){var b=[];a=u(a);for(var c=a.next();!c.done;c=a.next())(c=c.value)&&(c=c.video)&&c.height&&c.width&&b.push({height:c.height,width:c.width});return b.sort(function(d,e){return d.width-e.width})}S("shaka.abr.SimpleAbrManager",wg);
wg.prototype.configure=wg.prototype.configure;wg.prototype.setCmsdManager=wg.prototype.setCmsdManager;wg.prototype.setMediaElement=wg.prototype.setMediaElement;wg.prototype.playbackRateChanged=wg.prototype.playbackRateChanged;wg.prototype.setVariants=wg.prototype.setVariants;wg.prototype.getBandwidthEstimate=wg.prototype.getBandwidthEstimate;wg.prototype.trySuggestStreams=wg.prototype.trySuggestStreams;wg.prototype.segmentDownloaded=wg.prototype.segmentDownloaded;wg.prototype.disable=wg.prototype.disable;
wg.prototype.enable=wg.prototype.enable;wg.prototype.chooseVariant=wg.prototype.chooseVariant;wg.prototype.init=wg.prototype.init;wg.prototype.release=wg.prototype.release;wg.prototype.stop=wg.prototype.stop;var Ag=1;function Bg(a,b){if(a===b||!a.length||!b.length)return!0;a=u(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;if(Cg(c))return!0;for(var d=u(b),e=d.next();!e.done;e=d.next())if(e=e.value,c.keySystem===e.keySystem||Cg(e))return!0}return!1}
function Dg(a,b){if(!a.length)return b;if(!b.length)return a;var c=[];a=u(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;for(var e=u(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.keySystem==f.keySystem){e=new Map;for(var g=u((d.initData||[]).concat(f.initData||[])),h=g.next();!h.done;h=g.next())h=h.value,e.set(h.keyId,h);e=Array.from(e.values());g=d.keyIds&&f.keyIds?new Set([].concat(x(d.keyIds),x(f.keyIds))):d.keyIds||f.keyIds;c.push({keySystem:d.keySystem,licenseServerUri:d.licenseServerUri||
f.licenseServerUri,distinctiveIdentifierRequired:d.distinctiveIdentifierRequired||f.distinctiveIdentifierRequired,persistentStateRequired:d.persistentStateRequired||f.persistentStateRequired,videoRobustness:d.videoRobustness||f.videoRobustness,audioRobustness:d.audioRobustness||f.audioRobustness,serverCertificate:d.serverCertificate||f.serverCertificate,serverCertificateUri:d.serverCertificateUri||f.serverCertificateUri,initData:e,keyIds:g});break}else Cg(d)?c.push(d):Cg(f)&&c.push(f)}return c}
function Eg(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}function Hg(a){return a?!!a.match(/^com\.apple\.fps/):!1}function Cg(a){return(a=a.licenseServerUri)?a.startsWith("data:application/json;base64,"):!1}var Ig=new Sb(function(){return Mb(new Uint8Array([0]))}),Jg=new Map;function Kg(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}Kg.prototype.resolve=function(){};Kg.prototype.reject=function(){};function Lg(){this.g=null;this.i=!1;this.l=new Map;this.j=0;this.h={};Mg(this)}
function Mg(a){window.__INIT_BRIDGE_CALLED_COUNT__=(window.__INIT_BRIDGE_CALLED_COUNT__||0)+1;window.__INIT_BRIDGE_LAST_CALL__=Date.now();var b=window.__FLUTTER_CLEARKEY_HANDLER__;window.__INIT_HAS_STORED_HANDLER__=!!b;if(b&&typeof b==="function")window.__INIT_BRIDGE_METHOD__="stored_handler",a.g={wb:function(f,g){var h;return Q(function(k){if(k.g==1)return sa(k,2),E(k,b("flutterClearKey",f,g),4);if(k.g!=2)return k.return(k.h);h=va(k);throw h;})}};else if(window.__FLUTTER_CLEARKEY_WEBKIT__){window.__INIT_BRIDGE_METHOD__=
"webkit";var c=window.__FLUTTER_CLEARKEY_WEBKIT__,d=typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:window;a.g={wb:function(f,g){return new Promise(function(h,k){var l="cb_"+Date.now()+"_"+Math.random();d[l]=function(m){delete d[l];m.xo===!1?k(Error(m.error||"Unknown error")):h(m)};c.postMessage({method:f,Zn:g,ao:l})})}}}else{window.__INIT_BRIDGE_METHOD__="fallback_attempt";try{var e=typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:window;e.Wi&&e.Wi.xk&&
(window.__INIT_BRIDGE_METHOD__="direct_access_success",a.g={wb:function(f,g){var h;return Q(function(k){if(k.g==1)return sa(k,2),E(k,e.Wi.xk("flutterClearKey",f,g),4);if(k.g!=2)return k.return(k.h);h=va(k);throw h;})}})}catch(f){window.__INIT_BRIDGE_ERROR__=String(f)}a.g||(window.__INIT_BRIDGE_METHOD__="not_available")}}p=Lg.prototype;p.Bb=function(){this.g===null&&Mg(this);return this.g!==null};p.Cj=function(){if(this.g!==null)return!0;Mg(this);return this.Bb()};
p.hj=function(a){var b=this,c,d,e,f,g,h,k,l,m,n;return Q(function(q){if(q.g==1){if(!b.Bb())throw new U(2,6,10001);b.h=a;c=[];for(d in a)c.push({keyId:d,key:a[d]});return E(q,b.g.wb("initializeKeys",{keys:c}),2)}e=q.h;f=!1;g="No response from Flutter handler";h=0;try{k=JSON.stringify(e);console.log("\ud83d\udd27 [FLUTTER BRIDGE] Stringified result:",k);if(l=k.match(/"success"\s*:\s*(true|false)/))f=l[1]==="true",console.log("\ud83d\udd27 [FLUTTER BRIDGE] Extracted success:",f);if(m=k.match(/"error"\s*:\s*"([^"]*)"/))g=
m[1],console.log("\ud83d\udd27 [FLUTTER BRIDGE] Extracted error:",g);if(n=k.match(/"keyCount"\s*:\s*(\d+)/))h=parseInt(n[1],10),console.log("\ud83d\udd27 [FLUTTER BRIDGE] Extracted keyCount:",h)}catch(r){console.error("\ud83d\udd27 [FLUTTER BRIDGE] JSON processing failed:",r),f=!1,g="Failed to process Flutter response: "+r.message}window.__FLUTTER_INIT_KEYS_RESULT__=e;window.__FLUTTER_INIT_KEYS_RESULT_JSON__=JSON.stringify(e);window.__FLUTTER_INIT_KEYS_SUCCESS__=f;window.__FLUTTER_INIT_KEYS_ERROR__=
g;window.__FLUTTER_INIT_KEYS_COUNT__=h;console.log("\ud83d\udd27 [FLUTTER BRIDGE] Final result - success:",f,"keyCount:",h);if(!f)throw new U(2,6,10003,g);b.i=!0;H(q)})};
p.rk=function(a,b,c,d){d=d===void 0?null:d;var e=this,f,g,h,k,l,m,n,q,r,t,v,w,z,y,A;return Q(function(C){if(C.g==1){if(!e.Bb())throw new U(2,6,10001);if(!e.i)throw new U(2,6,10002);++e.j;f=Lb(a);g=Array.from(f);h=Lb(c);k=Array.from(h);sa(C,2);return E(C,e.g.wb("decrypt",{data:g,keyId:b,iv:k,subsamples:d||[]}),4)}if(C.g!=2){l=C.h;m=!1;n="Unknown decryption error";q=null;try{r=JSON.stringify(l),(t=r.match(/"success"\s*:\s*(true|false)/))&&(m=t[1]==="true"),(v=r.match(/"error"\s*:\s*"([^"]*)"/))&&(n=
v[1]),(w=r.match(/"data"\s*:\s*\[([^\]]*)\]/))&&(q=JSON.parse("["+w[1]+"]"))}catch(F){console.error("\ud83d\udd27 [FLUTTER BRIDGE] Decrypt result parsing failed:",F),m=!1,n="Failed to parse decrypt response: "+F.message}if(!m)throw new U(2,6,10004,n);if(!q)throw new U(2,6,10004,"No data in decrypt response");z=Lb(new ArrayBuffer(q.length));for(y=0;y<q.length;y++)z[y]=q[y];return C.return(Mb(z))}A=va(C);throw A;})};
p.Aj=function(a){var b=this,c,d,e,f,g,h,k,l,m,n,q,r,t;return Q(function(v){if(v.g==1){if(!b.Bb())throw new U(2,6,10001);c=Lb(a);d=Array.from(c);sa(v,2);return E(v,b.g.wb("processInitSegment",{data:d}),4)}if(v.g!=2){e=v.h;f=!1;g="Unknown error processing init segment";h=null;try{k=JSON.stringify(e),(l=k.match(/"success"\s*:\s*(true|false)/))&&(f=l[1]==="true"),(m=k.match(/"error"\s*:\s*"([^"]*)"/))&&(g=m[1]),(n=k.match(/"data"\s*:\s*\[([^\]]*)\]/))&&(h=JSON.parse("["+n[1]+"]"))}catch(w){console.error("[Flutter Bridge] Init segment parsing failed:",
w),f=!1,g="Failed to parse init segment response: "+w.message}if(!f)throw new U(2,6,10004,g);if(!h)throw new U(2,6,10004,"No data in init segment response");q=Lb(new ArrayBuffer(h.length));for(r=0;r<h.length;r++)q[r]=h[r];return v.return(Mb(q))}t=va(v);throw t;})};
p.Bj=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,q,r,t,v,w,z;return Q(function(y){if(y.g==1){if(!c.Bb())throw new U(2,6,10001);d=Lb(a);e=Array.from(d);f=Lb(b);g=Array.from(f);sa(y,2);return E(y,c.g.wb("processMediaSegment",{initData:e,segmentData:g}),4)}if(y.g!=2){h=y.h;k=!1;l="Unknown error processing media segment";m=null;try{n=JSON.stringify(h),(q=n.match(/"success"\s*:\s*(true|false)/))&&(k=q[1]==="true"),(r=n.match(/"error"\s*:\s*"([^"]*)"/))&&(l=r[1]),(t=n.match(/"data"\s*:\s*\[([^\]]*)\]/))&&
(m=JSON.parse("["+t[1]+"]"))}catch(A){console.error("[Flutter Bridge] Media segment parsing failed:",A),k=!1,l="Failed to parse media segment response: "+A.message}if(!k)throw new U(2,6,10004,l);if(!m)throw new U(2,6,10004,"No data in media segment response");v=Lb(new ArrayBuffer(m.length));for(w=0;w<m.length;w++)v[w]=m[w];return y.return(Mb(v))}z=va(y);throw z;})};p.Yk=function(){return this.h};p.Kl=function(a){return a in this.h};
p.destroy=function(){this.g=null;this.i=!1;this.l.clear();this.h={};return Promise.resolve()};var Rg=null;function Sg(){Rg||(Rg=new Lg);return Rg}Rb.FLUTTER_BRIDGE_NOT_AVAILABLE=10001;Rb.FLUTTER_KEY_NOT_INITIALIZED=10002;Rb.FLUTTER_KEY_INIT_FAILED=10003;Rb.FLUTTER_DECRYPT_FAILED=10004;S("shaka.drm.FlutterClearKeyBridge",Lg);S("shaka.drm.FlutterClearKeyBridge.getInstance",Sg);S("shaka.drm.FlutterClearKeyBridge.resetInstance",function(){Rg&&(Rg.destroy(),Rg=null)});
S("shaka.drm.FlutterClearKeyBridge.prototype.isAvailable",Lg.prototype.Bb);S("shaka.drm.FlutterClearKeyBridge.prototype.reinitialize",Lg.prototype.Cj);S("shaka.drm.FlutterClearKeyBridge.prototype.initializeKeys",Lg.prototype.hj);S("shaka.drm.FlutterClearKeyBridge.prototype.decrypt",Lg.prototype.rk);S("shaka.drm.FlutterClearKeyBridge.prototype.processInitSegment",Lg.prototype.Aj);S("shaka.drm.FlutterClearKeyBridge.prototype.processMediaSegment",Lg.prototype.Bj);
S("shaka.drm.FlutterClearKeyBridge.prototype.getKeys",Lg.prototype.Yk);S("shaka.drm.FlutterClearKeyBridge.prototype.hasKey",Lg.prototype.Kl);S("shaka.drm.FlutterClearKeyBridge.prototype.destroy",Lg.prototype.destroy);function Tg(a,b){var c=Ug();this.l=a.maxAttempts==null?c.maxAttempts:a.maxAttempts;this.j=a.baseDelay==null?c.baseDelay:a.baseDelay;this.u=a.fuzzFactor==null?c.fuzzFactor:a.fuzzFactor;this.m=a.backoffFactor==null?c.backoffFactor:a.backoffFactor;this.g=0;this.h=this.j;if(this.i=b===void 0?!1:b)this.g=1}
function Vg(a){var b,c;return Q(function(d){if(d.g==1){if(a.g>=a.l)if(a.i)a.g=1,a.h=a.j;else throw new U(2,7,1010);b=a.g;a.g++;if(b==0)return d.return();c=a.h*(1+(Math.random()*2-1)*a.u);return E(d,new Promise(function(e){(new Gf(e)).Y(c/1E3)}),2)}a.h*=a.m;H(d)})}function Ug(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function Wg(a,b){this.promise=a;this.i=b;this.g=null}function Xg(a){return new Wg(Promise.reject(a),function(){return Promise.resolve()})}function Yg(){var a=Promise.reject(new U(2,7,7001));a.catch(function(){});return new Wg(a,function(){return Promise.resolve()})}function Zg(a){return new Wg(Promise.resolve(a),function(){return Promise.resolve()})}function $g(a){return new Wg(a,function(){return a.catch(function(){})})}Wg.prototype.abort=function(){this.g||(this.g=this.i());return this.g};
function ah(a){return new Wg(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}Wg.prototype.finally=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
Wg.prototype.bb=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=bh(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new Kg;f.catch(function(){});var g=new U(2,7,7001);this.promise.then(c(!0),c(!1));return new Wg(f,function(){return d()})};
function bh(a,b,c){try{var d=a(b);if(d&&d.promise&&d.abort)return c.resolve(d.promise),function(){return d.abort()};c.resolve(d);return function(){return Promise.resolve(d).then(function(){},function(){})}}catch(e){return c.reject(e),function(){return Promise.resolve()}}}ea.Object.defineProperties(Wg.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return this.g!==null}}});S("shaka.util.AbortableOperation",Wg);Wg.prototype.chain=Wg.prototype.bb;Wg.prototype["finally"]=Wg.prototype.finally;
Wg.all=ah;Wg.prototype.abort=Wg.prototype.abort;Wg.notAbortable=$g;Wg.completed=Zg;Wg.aborted=Yg;Wg.failed=Xg;function ch(){this.g=[]}function dh(a,b){a.g.push(b.finally(function(){Tc(a.g,b)}))}ch.prototype.destroy=function(){for(var a=[],b=u(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.promise.catch(function(){}),a.push(c.abort());this.g=[];return Promise.all(a)};function eh(a,b,c,d,e,f,g){mb.call(this);this.i=null;this.j=!1;this.A=new ch;this.g=new Set;this.h=new Set;this.u=a||null;this.m=b||null;this.C=c||null;this.D=d||null;this.F=e||null;this.H=f||null;this.G=g||null;this.l=new Map}ma(eh,mb);p=eh.prototype;p.configure=function(a){this.i=a};function fh(a,b,c,d){d=d===void 0?!1:d;c=c||gh;var e=hh.get(a);(!e||c>=e.priority)&&hh.set(a,{priority:c,Xf:b,hm:d})}
function ih(a,b){for(var c=u(a.g),d=c.next();!d.done;d=c.next())b.g.add(d.value);a=u(a.h);for(c=a.next();!c.done;c=a.next())b.h.add(c.value)}p.lm=function(a){this.g.add(a)};p.Jm=function(a){this.g.delete(a)};p.zk=function(){this.g.clear()};p.nm=function(a){this.h.add(a)};p.Km=function(a){this.h.delete(a)};p.Ak=function(){this.h.clear()};p.Ni=function(){this.l.clear()};
function jh(a,b,c){return{uris:a,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:b,licenseRequestType:null,sessionId:null,drmInfo:null,initData:null,initDataType:null,streamDataCallback:c===void 0?null:c}}p.destroy=function(){this.j=!0;this.g.clear();this.h.clear();this.l.clear();mb.prototype.release.call(this);return this.A.destroy()};
p.request=function(a,b,c){var d=this,e=new kh;if(this.j){var f=Promise.reject(new U(2,7,7001));f.catch(function(){});return new lh(f,function(){return Promise.resolve()},e)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?Kd(b.retryParameters):Ug();b.uris=Kd(b.uris);f=mh(this,a,b,c);var g=f.bb(function(){return nh(d,a,b,c,new Tg(b.retryParameters,!1),0,null,e)}),h=g.bb(function(q){return oh(d,a,q,c)}),k=Date.now(),l=0;f.promise.then(function(){l=Date.now()-k},function(){});
var m=0;g.promise.then(function(){m=Date.now()},function(){});var n=h.bb(function(q){var r=Date.now()-m,t=q.response;t.timeMs+=l;t.timeMs+=r;q.Il||!d.u||t.fromCache||b.method=="HEAD"||a!=ph||d.u(t.timeMs,t.data.byteLength,qh(c),b,c);d.G&&d.G(a,t,c);return t},function(q){q&&(q.severity=2);throw q;});f=new lh(n.promise,function(){return n.abort()},e);dh(this.A,f);return f};
function mh(a,b,c,d){function e(h){f=f.bb(function(){c.body&&(c.body=Mb(c.body));return h(b,c,d)})}var f=Zg(void 0);a.F&&e(a.F);a=u(a.g);for(var g=a.next();!g.done;g=a.next())e(g.value);return f.bb(void 0,function(h){if(h instanceof U&&h.code==7001)throw h;throw new U(2,1,1006,h);})}
function nh(a,b,c,d,e,f,g,h){a.i.forceHTTP&&(c.uris[f]=c.uris[f].replace("https://","http://"));a.i.forceHTTPS&&(c.uris[f]=c.uris[f].replace("http://","https://"));f>0&&a.H&&a.H(b,d,c.uris[f],c.uris[f-1]);var k=new tb(c.uris[f]),l=k.nc,m=!1;l||(l=location.protocol,l=l.slice(0,-1),ub(k,l),c.uris[f]=k.toString());l=l.toLowerCase();var n=(l=hh.get(l))?l.Xf:null;if(!n)return Xg(new U(2,1,1E3,k));var q=l.hm;(k=a.l.get(k.Lb))&&(c.headers["common-access-token"]=k);var r=null,t=null,v=!1,w=!1,z;return $g(Vg(e)).bb(function(){if(a.j)return Yg();
z=Date.now();var y=0;c.requestStartTime=Date.now();var A=n(c.uris[f],c,b,function(D,B,G){r&&r.stop();t&&t.Y(F/1E3);a.u&&b==ph&&(y++,c.packetNumber=y,a.u(D,B,qh(d),c,d),m=!0,h.g=G)},function(D){w=!0;c.timeToFirstByte=Date.now()-c.requestStartTime;a.m&&a.m(D,c,b)},{minBytesForProgressEvents:a.i.minBytesForProgressEvents});if(!q)return A;var C=c.retryParameters.connectionTimeout;C&&(r=new Gf(function(){v=!0;A.abort()}),r.Y(C/1E3));var F=c.retryParameters.stallTimeout;F&&(t=new Gf(function(){v=!0;A.abort()}));
return A}).bb(function(y){r&&r.stop();t&&t.stop();y.timeMs==void 0&&(y.timeMs=Date.now()-z);var A=y.headers["common-access-token"];if(A){var C=new tb(y.uri);a.l.set(C.Lb,A)}A={response:y,Il:m};!w&&a.m&&a.m(y.headers,c,b);a.C&&a.C(c,y);return A},function(y){r&&r.stop();t&&t.stop();if(a.D){var A=null,C=0;y instanceof U&&(A=y,y.code==1001&&(C=y.data[1]));a.D(c,A,C,v)}if(a.j)return Yg();v&&(y=new U(1,1,1003,c.uris[f],b));if(y instanceof U){if(y.code==7001)throw y;if(y.code==1010)throw g;if(y.severity==
1){A=(new Map).set("error",y);A=new T("retry",A);A.cancelable=!0;a.dispatchEvent(A);if(A.defaultPrevented)throw y;f=(f+1)%c.uris.length;return nh(a,b,c,d,e,f,y,h)}}throw y;})}
function oh(a,b,c,d){var e=Zg(void 0);a=u(a.h);for(var f=a.next(),g={};!f.done;g={Ij:void 0},f=a.next())g.Ij=f.value,e=e.bb(function(h){return function(){var k=c.response;k.data&&(k.data=Mb(k.data));return(0,h.Ij)(b,k,d)}}(g));return e.bb(function(){return c},function(h){var k=2;if(h instanceof U){if(h.code==7001)throw h;k=h.severity}throw new U(k,1,1007,h);})}function qh(a){if(a){var b=a.segment;a=a.stream;if(b&&a&&a.fastSwitching&&b.od)return!1}return!0}S("shaka.net.NetworkingEngine",eh);
eh.prototype.request=eh.prototype.request;eh.prototype.destroy=eh.prototype.destroy;eh.makeRequest=jh;eh.defaultRetryParameters=function(){return Ug()};eh.prototype.clearCommonAccessTokenMap=eh.prototype.Ni;eh.prototype.clearAllResponseFilters=eh.prototype.Ak;eh.prototype.unregisterResponseFilter=eh.prototype.Km;eh.prototype.registerResponseFilter=eh.prototype.nm;eh.prototype.clearAllRequestFilters=eh.prototype.zk;eh.prototype.unregisterRequestFilter=eh.prototype.Jm;
eh.prototype.registerRequestFilter=eh.prototype.lm;eh.unregisterScheme=function(a){hh.delete(a)};eh.registerScheme=fh;eh.prototype.configure=eh.prototype.configure;function kh(){this.g=0}eh.NumBytesRemainingClass=kh;function lh(a,b,c){Wg.call(this,a,b);this.h=c}ma(lh,Wg);eh.PendingRequest=lh;var ph=1;eh.RequestType={MANIFEST:0,SEGMENT:ph,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6,ADS:7,CONTENT_STEERING:8,CMCD:9};
eh.AdvancedRequestType={INIT_SEGMENT:0,MEDIA_SEGMENT:1,MEDIA_PLAYLIST:2,MASTER_PLAYLIST:3,MPD:4,MSS:5,MPD_PATCH:6,MEDIATAILOR_SESSION_INFO:7,MEDIATAILOR_TRACKING_INFO:8,MEDIATAILOR_STATIC_RESOURCE:9,MEDIATAILOR_TRACKING_EVENT:10,INTERSTITIAL_ASSET_LIST:11,INTERSTITIAL_AD_URL:12};var gh=3;eh.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:gh};var hh=new Map;function rh(a){this.g=!1;this.h=new Kg;this.i=a}rh.prototype.destroy=function(){var a=this;if(this.g)return this.h;this.g=!0;return this.i().then(function(){a.h.resolve()},function(){a.h.resolve()})};function sh(a,b){if(a.g){if(b instanceof U&&b.code==7003)throw b;throw new U(2,7,7003,b);}};function th(a){for(var b=new Map,c=u(Object.keys(a)),d=c.next();!d.done;d=c.next())d=d.value,b.set(d,a[d]);return b}function uh(a){var b={};a.forEach(function(c,d){b[d]=c});return b};function vh(a,b){this.h=Pb(a);this.i=b==wh;this.g=0}p=vh.prototype;p.Pa=function(){return this.g<this.h.byteLength};p.Wa=function(){return this.g};p.getLength=function(){return this.h.byteLength};p.ba=function(){try{var a=this.h.getUint8(this.g);this.g+=1;return a}catch(b){throw xh();}};p.Ia=function(){try{var a=this.h.getUint16(this.g,this.i);this.g+=2;return a}catch(b){throw xh();}};p.$=function(){try{var a=this.h.getUint32(this.g,this.i);this.g+=4;return a}catch(b){throw xh();}};
p.Sh=function(){try{var a=this.h.getInt32(this.g,this.i);this.g+=4;return a}catch(b){throw xh();}};p.Ud=function(){try{if(this.i){var a=this.h.getUint32(this.g,!0);var b=this.h.getUint32(this.g+4,!0)}else b=this.h.getUint32(this.g,!1),a=this.h.getUint32(this.g+4,!1)}catch(c){throw xh();}if(b>2097151)throw new U(2,3,3001);this.g+=8;return b*4294967296+a};p.cc=function(a,b){if(this.g+a>this.h.byteLength)throw xh();var c=Lb(this.h,this.g,a);this.g+=a;return b?new Uint8Array(c):c};
p.skip=function(a){if(this.g+a>this.h.byteLength)throw xh();this.g+=a};p.Jj=function(a){if(this.g<a)throw xh();this.g-=a};p.seek=function(a){if(a<0||a>this.h.byteLength)throw xh();this.g=a};p.pd=function(){for(var a=this.g;this.Pa()&&this.h.getUint8(this.g)!=0;)this.g+=1;a=Lb(this.h,a,this.g-a);this.g+=1;return Yb(a)};function xh(){return new U(2,3,3E3)}S("shaka.util.DataViewReader",vh);vh.prototype.readTerminatedString=vh.prototype.pd;vh.prototype.seek=vh.prototype.seek;vh.prototype.rewind=vh.prototype.Jj;
vh.prototype.skip=vh.prototype.skip;vh.prototype.readBytes=vh.prototype.cc;vh.prototype.readUint64=vh.prototype.Ud;vh.prototype.readInt32=vh.prototype.Sh;vh.prototype.readUint32=vh.prototype.$;vh.prototype.readUint16=vh.prototype.Ia;vh.prototype.readUint8=vh.prototype.ba;vh.prototype.getLength=vh.prototype.getLength;vh.prototype.getPosition=vh.prototype.Wa;vh.prototype.hasMoreData=vh.prototype.Pa;var wh=1;vh.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:wh};function yh(){this.i=new Map;this.h=new Map;this.g=!1}p=yh.prototype;p.box=function(a,b){a=zh(a);this.i.set(a,Ah);this.h.set(a,b);return this};p.X=function(a,b){a=zh(a);this.i.set(a,Bh);this.h.set(a,b);return this};p.stop=function(){this.g=!0};p.parse=function(a,b,c){a=new vh(a,0);for(this.g=!1;a.Pa()&&!this.g;)this.Rd(0,a,b,c)};
p.Rd=function(a,b,c,d){var e=b.Wa();if(d&&e+8>b.getLength())this.g=!0;else{var f=b.$(),g=b.$(),h=Ch(g),k=!1;switch(f){case 0:f=b.getLength()-e;break;case 1:if(d&&b.Wa()+8>b.getLength()){this.g=!0;return}f=b.Ud();k=!0}var l=this.h.get(g);if(l){var m=null,n=null;if(this.i.get(g)==Bh){if(d&&b.Wa()+4>b.getLength()){this.g=!0;return}n=b.$();m=n>>>24;n&=16777215}g=e+f;c&&g>b.getLength()&&(g=b.getLength());d&&g>b.getLength()?this.g=!0:(g-=b.Wa(),b=g>0?b.cc(g,!1):new Uint8Array(0),b=new vh(b,0),l({name:h,
parser:this,partialOkay:c||!1,stopOnPartial:d||!1,version:m,flags:n,reader:b,size:f,start:e+a,has64BitSize:k}))}else b.skip(Math.min(e+f-b.Wa(),b.getLength()-b.Wa()))}};function Dh(a){for(var b=Eh(a);a.reader.Pa()&&!a.parser.g;)a.parser.Rd(a.start+b,a.reader,a.partialOkay,a.stopOnPartial)}function Fh(a){for(var b=Eh(a),c=a.reader.$(),d=0;d<c&&(a.parser.Rd(a.start+b,a.reader,a.partialOkay,a.stopOnPartial),!a.parser.g);d++);}
function Gh(a){var b=Eh(a);for(a.reader.skip(78);a.reader.Pa()&&!a.parser.g;)a.parser.Rd(a.start+b,a.reader,a.partialOkay,a.stopOnPartial)}function Hh(a){var b=Eh(a);a.reader.skip(8);var c=a.reader.Ia();a.reader.skip(6);c==2?a.reader.skip(48):a.reader.skip(12);for(c==1&&a.reader.skip(16);a.reader.Pa()&&!a.parser.g;)a.parser.Rd(a.start+b,a.reader,a.partialOkay,a.stopOnPartial)}function Ih(a,b){return function(c){a(c.reader.cc(c.reader.getLength()-c.reader.Wa(),b))}}
function zh(a){var b=0;a=u(a);for(var c=a.next();!c.done;c=a.next())b=b<<8|c.value.charCodeAt(0);return b}function Ch(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}function Eh(a){return 8+(a.has64BitSize?8:0)+(a.flags!=null?4:0)}S("shaka.util.Mp4Parser",yh);yh.headerSize=Eh;yh.typeToString=Ch;yh.allData=Ih;yh.audioSampleEntry=Hh;yh.visualSampleEntry=Gh;yh.sampleDescription=Fh;yh.children=Dh;yh.prototype.parseNext=yh.prototype.Rd;yh.prototype.parse=yh.prototype.parse;
yh.prototype.stop=yh.prototype.stop;yh.prototype.fullBox=yh.prototype.X;yh.prototype.box=yh.prototype.box;var Ah=0,Bh=1;function Jh(a){var b=this;this.g=[];this.h=[];this.data=[];(new yh).box("moov",Dh).box("moof",Dh).X("pssh",function(c){if(!(c.version>1)){var d=Lb(c.reader.h,-12,c.size);b.data.push(d);d=c.reader.cc(16,!1);b.g.push(nc(d));if(c.version>0){d=c.reader.$();for(var e=0;e<d;e++){var f=c.reader.cc(16,!1);f=nc(f);b.h.push(f)}}}}).parse(a)}
function Kh(a,b,c,d){var e=a.length,f=12+b.length+4+e;d>0&&(f+=4+16*c.size);var g=new Uint8Array(f),h=Pb(g),k=0;h.setUint32(k,f);k+=4;h.setUint32(k,1886614376);k+=4;d<1?h.setUint32(k,0):h.setUint32(k,16777216);k+=4;g.set(b,k);k+=b.length;if(d>0)for(h.setUint32(k,c.size),k+=4,b=u(c),c=b.next();!c.done;c=b.next())c=mc(c.value),g.set(c,k),k+=c.length;h.setUint32(k,e);g.set(a,k+4);return g};function Lh(a){var b=this;this.F=a;this.j=this.C=null;this.ea=this.J=!1;this.K=0;this.h=null;this.u=new Wc;this.i=new Map;this.V=[];this.D=new Map;this.L=!1;this.m=new Kg;this.g=null;this.A=function(c){c.severity==2&&b.m.reject(c);a.onError(c)};this.Z=new Map;this.aa=new Map;this.M=new Gf(function(){return Mh(b)});this.R=!1;this.O=[];this.W=!1;this.G=new Gf(function(){Nh(b)});this.m.catch(function(){});this.l=new rh(function(){return Oh(b)});this.P=!1;this.H=this.I=null;this.T=function(){return!1}}
p=Lh.prototype;p.destroy=function(){return this.l.destroy()};function Oh(a){return Q(function(b){switch(b.g){case 1:return a.u.release(),a.u=null,a.m.reject(),a.G.stop(),a.G=null,a.M.stop(),a.M=null,E(b,Ph(a),2);case 2:if(!a.j){b.B(3);break}sa(b,4);return E(b,a.j.setMediaKeys(null),6);case 6:ua(b,5);break;case 4:va(b);case 5:a.j=null;case 3:a.h=null,a.C=null,a.D=new Map,a.g=null,a.A=function(){},a.F=null,a.P=!1,a.I=null,H(b)}})}
p.configure=function(a,b){this.g=a;b&&(this.T=b);this.G&&this.J&&this.h&&this.G.xa(this.g.updateExpirationTime)};function Qh(a,b,c){a.ea=!0;a.D=new Map;a.R=c;return Rh(a,b,!1)}
function Sh(a,b,c,d){d=d===void 0?!0:d;window.__SHAKA_DRM_INIT_CALLED__=!0;a.D=new Map;c=u(c);for(var e=c.next();!e.done;e=c.next())a.D.set(e.value,{initData:null,initDataType:null});c=u(a.g.persistentSessionsMetadata);for(e=c.next();!e.done;e=c.next())e=e.value,a.D.set(e.sessionId,{initData:e.initData,initDataType:e.initDataType});a.R=a.D.size>0;return Rh(a,b,d)}
function Th(a,b,c,d,e,f){var g,h,k,l,m;return Q(function(n){if(n.g==1)return g=[],f.length&&g.push(f[0].contentType),e.length&&g.push(e[0].contentType),h=function(q){q=qc(b,q,null);q.licenseServerUri=c;q.serverCertificate=d;q.persistentStateRequired=!0;q.sessionType="persistent-license";return q},k=vg(g),k.video&&(l=h(f[0].encryptionScheme||""),k.video.drmInfos.push(l)),k.audio&&(m=h(e[0].encryptionScheme||""),k.audio.drmInfos.push(m)),E(n,Vf([k],!0,a.P,[]),2);sh(a.l);return n.return(Uh(a,[k]))})}
function Rh(a,b,c){var d,e,f,g,h,k,l,m,n,q,r,t,v,w,z,y,A,C,F,D;return Q(function(B){if(B.g==1){window.__SHAKA_DRM_INIT_CALLED__=!0;window.__SHAKA_DRM_INIT_VARIANTS__=b.length;gb(a.g.clearKeys?Object.keys(a.g.clearKeys).length+" keys":"none");Vh(a.g.clearKeys,b);d=b.some(function(G){return G.video&&G.video.drmInfos.length||G.audio&&G.audio.drmInfos.length?!0:!1});e=th(a.g.servers);f=th(a.g.advanced||{});!d&&c&&Wh(b,e);g=new WeakSet;h=u(b);for(k=h.next();!k.done;k=h.next())for(l=k.value,m=Xh(l),n=u(m),
q=n.next();!q.done;q=n.next())r=q.value,g.has(r)||(g.add(r),Yh(r,e,f,a.g.keySystemsMapping));t=function(G,K){var I=[];G=u(G);for(var J=G.next();!J.done;J=G.next()){J=J.value;var L=J[K]||f.has(J.keySystem)&&f.get(J.keySystem)[K]||"",N;if(N=L=="")N=(N=J.keySystem)?!!N.match(/^com\.widevine\.alpha/):!1;N&&(K=="audioRobustness"?L=[a.g.defaultAudioRobustnessForWidevine]:K=="videoRobustness"&&(L=[a.g.defaultVideoRobustnessForWidevine]));if(typeof L==="string")I.push(J);else if(Array.isArray(L))for(L.length===
0&&(L=[""]),L=u(L),N=L.next();!N.done;N=L.next()){var P={};I.push(Object.assign({},J,(P[K]=N.value,P)))}}return I};v=new WeakSet;w=u(b);for(z=w.next();!z.done;z=w.next())y=z.value,y.video&&!v.has(y.video)&&(y.video.drmInfos=t(y.video.drmInfos,"videoRobustness"),y.video.drmInfos=t(y.video.drmInfos,"audioRobustness"),v.add(y.video)),y.audio&&!v.has(y.audio)&&(y.audio.drmInfos=t(y.audio.drmInfos,"videoRobustness"),y.audio.drmInfos=t(y.audio.drmInfos,"audioRobustness"),v.add(y.audio));return E(B,Vf(b,
a.R,a.P,a.g.preferredKeySystems),2)}sh(a.l);A=d||e.size>0;window.__SHAKA_HAS_DRM_INFO__=A;window.__SHAKA_SERVERS_SIZE__=e.size;C=Sg();F=a.g.clearKeys&&Object.keys(a.g.clearKeys).length>0;window.__SHAKA_HAS_CLEAR_KEYS__=F;window.__SHAKA_BRIDGE_AVAILABLE_INIT__=C.Bb();F&&ib(Object.keys(a.g.clearKeys).length);if(F){C.Bb()||(C.Cj(),window.__SHAKA_BRIDGE_AVAILABLE_AFTER_REINIT__=C.Bb(),ib(C.Bb()?"available":"not available"));if(C.Bb())return window.__SHAKA_FLUTTER_MODE_ACTIVATED__=!0,B.return(Zh(a));window.__SHAKA_FLUTTER_MODE_FAILED__=
!0}if(!A)return a.J=!0,B.return(Promise.resolve());D=Uh(a,b);return B.return(d?D:D.catch(function(){}))})}function Zh(a){var b,c;return Q(function(d){if(d.g==1){b=Sg();if(!b.Bb())throw new U(2,6,10001,"Flutter bridge is not available");sa(d,2);return E(d,b.hj(a.g.clearKeys),4)}if(d.g!=2)return sh(a.l),a.J=!0,Object.keys(a.g.clearKeys),ua(d,0);c=va(d);throw c;})}
function $h(a){var b;return Q(function(c){switch(c.g){case 1:if(a.j.mediaKeys)return c.return();if(!a.I){c.B(2);break}return E(c,a.I,3);case 3:return sh(a.l),c.return();case 2:return sa(c,4),a.I=a.j.setMediaKeys(a.C),E(c,a.I,6);case 6:ua(c,5);break;case 4:b=va(c),a.A(new U(2,6,6003,b.message));case 5:sh(a.l),H(c)}})}function ai(a,b){return Q(function(c){if(c.g==1)return E(c,$h(a),2);bi(a,b.initDataType,Lb(b.initData));H(c)})}
p.ec=function(a){var b=this,c,d;return Q(function(e){if(e.g==1){if(b.j===a)return e.return();if(!b.C)return b.u.ua(a,"encrypted",function(){b.A(new U(2,6,6010))}),e.return();b.j=a;b.g.delayLicenseRequestUntilPlayed&&b.u.ua(b.j,"play",function(){for(var f=u(b.O),g=f.next();!g.done;g=f.next())ci(b,g.value);b.W=!0;b.O=[]});b.j.remote?(b.u.o(b.j.remote,"connect",function(){return Ph(b)}),b.u.o(b.j.remote,"connecting",function(){return Ph(b)}),b.u.o(b.j.remote,"disconnect",function(){return Ph(b)})):"webkitCurrentPlaybackTargetIsWireless"in
b.j&&b.u.o(b.j,"webkitcurrentplaybacktargetiswirelesschanged",function(){return Ph(b)});b.H=b.h?b.h.initData.find(function(f){return f.initData.length>0})||null:null;c=b.h.keySystem;return(d=Tb().Kh(c))||!b.H&&b.h.keySystem==="com.apple.fps"&&!b.D.size?e.B(2):E(e,$h(b),2)}di(b).catch(function(){});!d&&(b.H||b.D.size||b.g.parseInbandPsshEnabled)||b.u.o(b.j,"encrypted",function(f){return ai(b,f)});H(e)})};
function ei(a){var b,c,d,e,f;return Q(function(g){switch(g.g){case 1:if(!a.C||!a.h)return g.return();if(!a.h.serverCertificateUri||a.h.serverCertificate&&a.h.serverCertificate.length){g.B(2);break}b=jh([a.h.serverCertificateUri],a.g.retryParameters);sa(g,3);c=a.F.Fc.request(5,b,{isPreload:a.T()});return E(g,c.promise,5);case 5:d=g.h;a.h.serverCertificate=Lb(d.data);ua(g,4);break;case 3:throw e=va(g),new U(2,6,6017,e);case 4:if(a.l.g)return g.return();case 2:if(!a.h.serverCertificate||!a.h.serverCertificate.length)return g.return();
sa(g,6);return E(g,a.C.setServerCertificate(a.h.serverCertificate),8);case 8:ua(g,0);break;case 6:throw f=va(g),new U(2,6,6004,f.message);}})}function fi(a,b){var c,d,e;return Q(function(f){if(f.g==1)return E(f,gi(a,b,{initData:null,initDataType:null}),2);if(f.g!=3){c=f.h;if(!c)return f.return();d=[];if(e=a.i.get(c))e.Sb=new Kg,d.push(e.Sb);d.push(c.remove());return E(f,Promise.all(d),3)}a.i.delete(c);H(f)})}
function di(a){var b,c,d,e,f;return Q(function(g){if(g.g==1){if(!a.D.size)return g.B(2);a.D.forEach(function(h,k){gi(a,k,h)});return E(g,a.m,3)}if(g.g!=2){b=a.h&&a.h.keyIds||new Set([]);if(b.size>0&&hi(a))return g.return(a.m);a.L=!1;a.m=new Kg;a.m.catch(function(){})}c=(a.h?a.h.initData:[])||[];d=u(c);for(e=d.next();!e.done;e=d.next())f=e.value,bi(a,f.initDataType,f.initData);ii(a)&&a.m.resolve();return g.return(a.m)})}
function bi(a,b,c){if(c.length){if(a.g.ignoreDuplicateInitData){var d=a.i.values();d=u(d);for(var e=d.next();!e.done;e=d.next())if(Kb(c,e.value.initData))return;var f=!1;a.D.forEach(function(g){!f&&Kb(c,g.initData)&&(f=!0)});if(f)return}a.L=!0;a.i.size>0&&ii(a)&&(a.m.resolve(),a.L=!1,a.m=new Kg,a.m.catch(function(){}));ji(a,b,c,a.h.sessionType)}}function ki(a){a=a.i.keys();a=nb(a,function(b){return b.sessionId});return Array.from(a)}
p.ph=function(){var a=this,b=this.i.keys();b=nb(b,function(c){var d=a.i.get(c);return{sessionId:c.sessionId,sessionType:d.type,initData:d.initData,initDataType:d.initDataType}});return Array.from(b)};p.qe=function(){var a=Infinity,b=this.i.keys();b=u(b);for(var c=b.next();!c.done;c=b.next())c=c.value,isNaN(c.expiration)||(a=Math.min(a,c.expiration));return a};function mi(a){return a.K?a.K:NaN}p.wf=function(){return uh(this.aa)};
function Uh(a,b){var c,d,e,f,g,h,k;return Q(function(l){switch(l.g){case 1:c=new Map;d=ni(a,b,c);if(!d){if(!navigator.requestMediaKeySystemAccess)throw new U(2,6,6020);throw new U(2,6,6001);}sh(a.l);sa(l,2);d.getConfiguration();var m=e=a.g.keySystemsMapping[d.keySystem]||d.keySystem,n=c.get(e),q=[],r=[],t=[],v=[],w=[],z=new Set,y=new Set;oi(n,q,r,v,t,w,z,y);var A=a.R?"persistent-license":"temporary";m={keySystem:m,encryptionScheme:q[0],licenseServerUri:r[0],distinctiveIdentifierRequired:n[0].distinctiveIdentifierRequired,
persistentStateRequired:n[0].persistentStateRequired,sessionType:n[0].sessionType||A,audioRobustness:n[0].audioRobustness||"",videoRobustness:n[0].videoRobustness||"",serverCertificate:v[0],serverCertificateUri:t[0],initData:w,keyIds:z};y.size>0&&(m.keySystemUris=y);n=u(n);for(y=n.next();!y.done;y=n.next())y=y.value,y.distinctiveIdentifierRequired&&(m.distinctiveIdentifierRequired=y.distinctiveIdentifierRequired),y.persistentStateRequired&&(m.persistentStateRequired=y.persistentStateRequired);a.h=
m;if(!a.h.licenseServerUri)throw new U(2,6,6012,a.h.keySystem);return E(l,d.createMediaKeys(),4);case 4:f=l.h;sh(a.l);a.C=f;if(!(a.g.minHdcpVersion!=""&&"getStatusForPolicy"in a.C)){l.B(5);break}sa(l,6);return E(l,a.C.getStatusForPolicy({minHdcpVersion:a.g.minHdcpVersion}),8);case 8:g=l.h;if(g!="usable")throw new U(2,6,6018);sh(a.l);ua(l,5,2);break;case 6:h=va(l,2);if(h instanceof U)throw h;throw new U(2,6,6019,h.message);case 5:return a.J=!0,a.G.xa(a.g.updateExpirationTime),E(l,ei(a),9);case 9:sh(a.l);
ua(l,0);break;case 2:k=va(l);sh(a.l,k);a.h=null;if(k instanceof U)throw k;throw new U(2,6,6002,k.message);}})}
function ni(a,b,c){for(var d=u(b),e=d.next();!e.done;e=d.next()){e=u(Xh(e.value));for(var f=e.next();!f.done;f=e.next())f=f.value,c.has(f.keySystem)||c.set(f.keySystem,[]),c.get(f.keySystem).push(f)}if(c.size==1&&c.has(""))throw new U(2,6,6E3);d=a.g.preferredKeySystems;d.length||(e=th(a.g.servers),e.size==1&&(d=Array.from(e.keys())));e=u(d);var g=e.next();for(f={};!g.done;f={zj:void 0},g=e.next()){f.zj=g.value;g=u(b);for(var h=g.next();!h.done;h=g.next())if(h=h.value.decodingInfos.find(function(n){return function(q){return q.supported&&
q.keySystemAccess!=null&&q.keySystemAccess.keySystem==n.zj}}(f)))return h.keySystemAccess}e=u([!0,!1]);for(f=e.next();!f.done;f=e.next())for(f=f.value,g=u(b),h=g.next();!h.done;h=g.next()){h=u(h.value.decodingInfos);for(var k=h.next();!k.done;k=h.next())if(k=k.value,k.supported&&k.keySystemAccess){var l=k.keySystemAccess.keySystem;if(!d.includes(l)){var m=c.get(l);!m&&a.g.keySystemsMapping[l]&&(m=c.get(a.g.keySystemsMapping[l]));l=u(m);for(m=l.next();!m.done;m=l.next())if(!!m.value.licenseServerUri==
f)return k.keySystemAccess}}}return null}function pi(a){ii(a)&&a.m.resolve()}function qi(a,b){(new Gf(function(){b.loaded=!0;pi(a)})).Y(ri)}
function gi(a,b,c){var d,e,f,g,h,k,l;return Q(function(m){switch(m.g){case 1:try{d=a.C.createSession("persistent-license")}catch(n){return e=new U(2,6,6005,n.message),a.A(e),m.return(Promise.reject(e))}a.u.o(d,"message",function(n){a.j&&a.g.delayLicenseRequestUntilPlayed&&a.j.paused&&!a.W?a.O.push(n):ci(a,n)});a.u.o(d,"keystatuseschange",function(n){return si(a,n)});f={initData:c.initData,initDataType:c.initDataType,loaded:!1,Nh:Infinity,Sb:null,type:"persistent-license"};a.i.set(d,f);sa(m,2);return E(m,
d.load(b),4);case 4:return g=m.h,sh(a.l),g||(a.i.delete(d),h=a.g.persistentSessionOnlinePlayback?1:2,a.A(new U(h,6,6013)),f.loaded=!0),qi(a,f),pi(a),m.return(d);case 2:k=va(m),sh(a.l,k),a.i.delete(d),l=a.g.persistentSessionOnlinePlayback?1:2,a.A(new U(l,6,6005,k.message)),f.loaded=!0,pi(a);case 3:return m.return(Promise.resolve())}})}
function ji(a,b,c,d){try{var e=a.C.createSession(d)}catch(f){a.A(new U(2,6,6005,f.message));return}a.u.o(e,"message",function(f){a.j&&a.g.delayLicenseRequestUntilPlayed&&a.j.paused&&!a.W?a.O.push(f):ci(a,f)});a.u.o(e,"keystatuseschange",function(f){return si(a,f)});a.i.set(e,{initData:c,initDataType:b,loaded:!1,Nh:Infinity,Sb:null,type:d});try{c=a.g.initDataTransform(c,b,a.h)}catch(f){b=f;f instanceof U||(b=new U(2,6,6016,f));a.A(b);return}a.g.logLicenseExchange&&jc(c);e.generateRequest(b,c).catch(function(f){if(!a.l.g){a.i.delete(e);
var g=f.errorCode;if(g&&g.systemCode){var h=g.systemCode;h<0&&(h+=4294967296);h="0x"+h.toString(16)}a.A(new U(2,6,6006,f.message,f,h))}})}function ti(a){return Q(function(b){return b.g==1?a.L?E(b,a.m,3):b.B(0):E(b,Promise.all(a.V.map(function(c){return c.promise})),0)})}
function ci(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,t,v,w,z;Q(function(y){switch(y.g){case 1:c=b.target;a.g.logLicenseExchange&&jc(b.message);d=a.i.get(c);e=a.h.licenseServerUri;f=a.g.advanced[a.h.keySystem];b.messageType=="individualization-request"&&f&&f.individualizationServer&&(e=f.individualizationServer);g=jh([e],a.g.retryParameters);g.body=b.message;g.method="POST";g.licenseRequestType=b.messageType;g.sessionId=c.sessionId;g.drmInfo=a.h;d&&(g.initData=d.initData,g.initDataType=d.initDataType);if(f&&
f.headers)for(h in f.headers)g.headers[h]=f.headers[h];if(a.h.keySystem==="org.w3.clearkey"){var A=g,C=a.h;try{var F=ac(A.body);if(F){var D=JSON.parse(F);D.type||(D.type=C.sessionType,A.body=bc(JSON.stringify(D)))}}catch(B){}}if(Eg(a.h.keySystem))if(A=Zb(g.body,!0,!0),A.includes("PlayReadyKeyMessage")){A=Od(A,"PlayReadyKeyMessage");C=Yd(A,"HttpHeader");C=u(C);for(F=C.next();!F.done;F=C.next())D=F.value,F=Yd(D,"name")[0],D=Yd(D,"value")[0],g.headers[Wd(F)]=Wd(D);A=Yd(A,"Challenge")[0];g.body=lc(Wd(A))}else g.headers["Content-Type"]=
"text/xml; charset=utf-8";k=Date.now();sa(y,2);m=a.F.Fc.request(2,g,{isPreload:a.T()});a.V.push(m);return E(y,m.promise,4);case 4:l=y.h;Tc(a.V,m);ua(y,3);break;case 2:n=va(y);if(a.l.g)return y.return();q={sessionId:c.sessionId,sessionType:d.type,initData:d.initData,initDataType:d.initDataType};r=new U(2,6,6007,n,q);a.i.size==1?(a.A(r),d&&d.Sb&&d.Sb.reject(r)):(d&&d.Sb&&d.Sb.reject(r),a.i.delete(c),ii(a)&&(a.m.resolve(),a.M.Y(.1)));return y.return();case 3:if(a.l.g)return y.return();a.K+=(Date.now()-
k)/1E3;a.g.logLicenseExchange&&jc(l.data);sa(y,5);return E(y,c.update(l.data),7);case 7:ua(y,6);break;case 5:return v=(t=va(y))&&t.message||String(t),w=new U(2,6,6008,v),a.A(w),d&&d.Sb&&d.Sb.reject(w),y.return();case 6:if(a.l.g)return y.return();z=new T("drmsessionupdate");a.F.onEvent(z);d&&(d.Sb&&d.Sb.resolve(),qi(a,d));H(y)}})}
function si(a,b){b=b.target;var c=a.i.get(b),d=!1;b.keyStatuses.forEach(function(f,g){if(typeof g=="string"){var h=g;g=f;f=h}h=Tb();if(Eg(a.h.keySystem)&&g.byteLength==16&&h.Yh()){h=Pb(g);var k=h.getUint32(0,!0),l=h.getUint16(4,!0),m=h.getUint16(6,!0);h.setUint32(0,k,!1);h.setUint16(4,l,!1);h.setUint16(6,m,!1)}f!="status-pending"&&(c.loaded=!0);f=="expired"&&(d=!0);g=nc(g).slice(0,32);a.Z.set(g,f)});var e=b.expiration-Date.now();(e<0||d&&e<1E3)&&c&&!c.Sb&&(a.i.delete(b),ui(b));ii(a)&&(a.m.resolve(),
a.M.Y(vi))}function Mh(a){var b=a.Z,c=a.aa;c.clear();b.forEach(function(d,e){return c.set(e,d)});b=Array.from(c.values());b.length&&b.every(function(d){return d=="expired"})&&a.A(new U(2,6,6014));a.F.Uf(uh(c))}
function wi(){var a,b,c,d,e,f,g,h,k,l,m,n,q,r,t,v,w,z,y,A,C,F,D,B,G,K,I,J,L,N,P,O;return Q(function(M){if(M.g==1){a="org.w3.clearkey com.widevine.alpha com.widevine.alpha.experiment com.microsoft.playready com.microsoft.playready.hardware com.microsoft.playready.recommendation com.microsoft.playready.recommendation.3000 com.microsoft.playready.recommendation.3000.clearlead com.chromecast.playready com.apple.fps.1_0 com.apple.fps com.huawei.wiseplay".split(" ");if(!(window.MediaKeys&&window.navigator&&
window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)){b={};c=u(a);for(d=c.next();!d.done;d=c.next())e=d.value,b[e]=null;return M.return(b)}f="1.0 1.1 1.2 1.3 1.4 2.0 2.1 2.2 2.3".split(" ");g=["SW_SECURE_CRYPTO","SW_SECURE_DECODE","HW_SECURE_CRYPTO","HW_SECURE_DECODE","HW_SECURE_ALL"];h=["150","2000","3000"];k={"com.widevine.alpha":g,"com.widevine.alpha.experiment":g,"com.microsoft.playready.recommendation":h};l=[{contentType:'video/mp4; codecs="avc1.42E01E"'},
{contentType:'video/webm; codecs="vp8"'}];m=[{contentType:'audio/mp4; codecs="mp4a.40.2"'},{contentType:'audio/webm; codecs="opus"'}];n={videoCapabilities:l,audioCapabilities:m,initDataTypes:["cenc","sinf","skd","keyids"]};q=[null,"cenc","cbcs"];r=new Map;t=Tb();v=function(R,V,xa){var ba,Oa,Ha,Ia,Fa,wa,Ca,Ma,La,Ba,eb,hb,pb;return Q(function(Ua){switch(Ua.g){case 1:return sa(Ua,2),E(Ua,V.createMediaKeys(),5);case 5:ba=Ua.h;case 4:ua(Ua,3);break;case 2:return va(Ua),Ua.return();case 3:Ha=(Oa=V.getConfiguration().sessionTypes)?
Oa.includes("persistent-license"):!1;t.rj()&&(Ha=!1);Ia=V.getConfiguration().videoCapabilities;Fa=V.getConfiguration().audioCapabilities;wa={persistentState:Ha,encryptionSchemes:[],videoRobustnessLevels:[],audioRobustnessLevels:[],minHdcpVersions:[]};r.get(R)?wa=r.get(R):r.set(R,wa);(Ca=Ia[0].encryptionScheme)&&!wa.encryptionSchemes.includes(Ca)&&wa.encryptionSchemes.push(Ca);(Ma=Ia[0].robustness)&&!wa.videoRobustnessLevels.includes(Ma)&&wa.videoRobustnessLevels.push(Ma);(La=Fa[0].robustness)&&!wa.audioRobustnessLevels.includes(La)&&
wa.audioRobustnessLevels.push(La);if(!(xa&&"getStatusForPolicy"in ba)){Ua.B(0);break}Ba=u(f);eb=Ba.next();case 7:if(eb.done){Ua.B(0);break}hb=eb.value;if(wa.minHdcpVersions.includes(hb)){Ua.B(8);break}return E(Ua,ba.getStatusForPolicy({minHdcpVersion:hb}),10);case 10:if(pb=Ua.h,pb=="usable")wa.minHdcpVersions.includes(hb)||wa.minHdcpVersions.push(hb);else{Ua.B(0);break}case 8:eb=Ba.next(),Ua.B(7)}})};w=function(R,V,xa,ba,Oa){Oa=Oa===void 0?!1:Oa;var Ha,Ia,Fa,wa,Ca,Ma,La,Ba,eb,hb,pb;return Q(function(Ua){switch(Ua.g){case 1:sa(Ua,
2);Ha=Kd(n);Ia=u(Ha.videoCapabilities);for(Fa=Ia.next();!Fa.done;Fa=Ia.next())wa=Fa.value,wa.encryptionScheme=V,wa.robustness=xa;Ca=u(Ha.audioCapabilities);for(Ma=Ca.next();!Ma.done;Ma=Ca.next())La=Ma.value,La.encryptionScheme=V,La.robustness=ba;Ba=Kd(Ha);Ba.persistentState="required";Ba.sessionTypes=["persistent-license"];eb=[Ba,Ha];pb=Tb();return pb.Oa()=="MOBILE"?E(Ua,Kf(5,navigator.requestMediaKeySystemAccess(R,eb)),7):E(Ua,navigator.requestMediaKeySystemAccess(R,eb),6);case 6:hb=Ua.h;Ua.B(5);
break;case 7:hb=Ua.h;case 5:return E(Ua,v(R,hb,Oa),8);case 8:ua(Ua,0);break;case 2:va(Ua),H(Ua)}})};z=u(a);for(y=z.next();!y.done;y=z.next())A=y.value,r.set(A,null);C=function(R){return Tb().Ja()==="WEBKIT"&&R==="org.w3.clearkey"?!1:!0};F=[];D=u(a);for(B=D.next();!B.done;B=D.next())if(G=B.value,C(G)){K=!0;I=u(q);for(J=I.next();!J.done;J=I.next())L=J.value,F.push(w(G,L,"","",K)),K=!1;N=u(k[G]||[]);for(P=N.next();!P.done;P=N.next())O=P.value,F.push(w(G,null,O,"")),F.push(w(G,null,"",O))}return E(M,
Promise.all(F),2)}return M.return(uh(r))})}function ui(a){return Q(function(b){if(b.g==1)return sa(b,2),E(b,Kf(Ai,Promise.all([a.close().catch(function(){}),a.closed])),4);if(b.g!=2)return ua(b,0);va(b);H(b)})}
function Ph(a){var b;return Q(function(c){b=Array.from(a.i.entries());a.i.clear();return E(c,Promise.all(b.map(function(d){d=u(d);var e=d.next().value;var f=d.next().value;return Q(function(g){if(g.g==1)return sa(g,2),a.ea||a.D.has(e.sessionId)||f.type!=="persistent-license"||a.g.persistentSessionOnlinePlayback?E(g,ui(e),5):E(g,e.remove(),5);if(g.g!=2)return ua(g,0);va(g);H(g)})})),0)})}function Xh(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}
function Nh(a){a.i.forEach(function(b,c){var d=b.Nh,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.F.onExpirationUpdated(c.sessionId,e),b.Nh=e)})}function ii(a){a=a.i.values();return ob(a,function(b){return b.loaded})}function hi(a){for(var b=u(a.h&&a.h.keyIds||new Set([])),c=b.next();!c.done;c=b.next())if(a.Z.get(c.value)!=="usable")return!1;return!0}
function Wh(a,b){var c=[];b.forEach(function(d,e){c.push({keySystem:e,licenseServerUri:d,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",initData:[],keyIds:new Set})});a=u(a);for(b=a.next();!b.done;b=a.next())b=b.value,b.video&&(b.video.drmInfos=c),b.audio&&(b.audio.drmInfos=c)}
function oi(a,b,c,d,e,f,g,h){var k=[];a=u(a);for(var l=a.next(),m={};!l.done;m={Ta:void 0},l=a.next()){m.Ta=l.value;b.includes(m.Ta.encryptionScheme)||b.push(m.Ta.encryptionScheme);m.Ta.keySystem=="org.w3.clearkey"&&m.Ta.licenseServerUri.startsWith("data:application/json;base64,")?k.includes(m.Ta.licenseServerUri)||k.push(m.Ta.licenseServerUri):c.includes(m.Ta.licenseServerUri)||c.push(m.Ta.licenseServerUri);e.includes(m.Ta.serverCertificateUri)||e.push(m.Ta.serverCertificateUri);m.Ta.serverCertificate&&
(d.some(function(r){return function(t){return Kb(t,r.Ta.serverCertificate)}}(m))||d.push(m.Ta.serverCertificate));if(m.Ta.initData){l=u(m.Ta.initData);for(var n=l.next(),q={};!n.done;q={Eh:void 0},n=l.next())q.Eh=n.value,f.some(function(r){return function(t){var v=r.Eh;return t.keyId&&t.keyId==v.keyId?!0:t.initDataType==v.initDataType&&Kb(t.initData,v.initData)}}(q))||f.push(q.Eh)}if(m.Ta.keyIds)for(l=u(m.Ta.keyIds),n=l.next();!n.done;n=l.next())g.add(n.value);if(m.Ta.keySystemUris&&h)for(m=u(m.Ta.keySystemUris),
l=m.next();!l.done;l=m.next())h.add(l.value)}if(k.length==1)c.push(k[0]);else if(k.length>0){b=[];k=u(k);for(d=k.next();!d.done;d=k.next())d=window.atob(d.value.split("data:application/json;base64,").pop()),d=JSON.parse(d),b.push.apply(b,x(d.keys));k=JSON.stringify({keys:b});c.push("data:application/json;base64,"+window.btoa(k))}}
function Yh(a,b,c,d){var e=a.keySystem;if(e&&(e!="org.w3.clearkey"||!a.licenseServerUri)){b.size&&b.get(e)&&(b=b.get(e),a.licenseServerUri=b);a.keyIds||(a.keyIds=new Set);if(c=c.get(e))a.distinctiveIdentifierRequired||(a.distinctiveIdentifierRequired=c.distinctiveIdentifierRequired),a.persistentStateRequired||(a.persistentStateRequired=c.persistentStateRequired),a.serverCertificate||(a.serverCertificate=c.serverCertificate),c.sessionType&&(a.sessionType=c.sessionType),a.serverCertificateUri||(a.serverCertificateUri=
c.serverCertificateUri);d[e]&&(a.keySystem=d[e]);window.cast&&window.cast.__platform__&&e=="com.microsoft.playready"&&(a.keySystem="com.chromecast.playready")}}function Vh(a,b){a=th(a);if(a.size!=0){a=rc(a);b=u(b);for(var c=b.next();!c.done;c=b.next())c=c.value,c.video&&(c.video.drmInfos=[a]),c.audio&&(c.audio.drmInfos=[a])}}var Ai=1,ri=5,vi=.5;function Bi(){this.g=Ci;this.i=(new Map).set(Ci,2).set(Di,1);this.h=0}function Ei(a,b){var c=a.g!==b;a.g=b;c&&b===Ci&&(a.h=Date.now());return c}var Di=0,Ci=1;/*
 @license
 Shaka Player
 Copyright 2023 Google LLC
 SPDX-License-Identifier: Apache-2.0
*/
function Fi(a,b,c){this.g=a;this.i=b;this.h=c}function Gi(a,b){return Q(function(c){if(c.g==1)return E(c,Qf(a.h,b,a.g.drm.preferredKeySystems,a.g.drm.keySystemsMapping),2);a.g.streaming.dontChooseCodecs||Mf(b,a.g.preferredVideoCodecs,a.g.preferredAudioCodecs,a.g.preferredDecodingAttributes,a.g.preferredTextFormats);if(!b.variants.some(og))throw new U(2,4,4032);return c.return(Hi(a,b))})}
function Ii(a,b){var c=a.g.restrictions;a=a.i;var d=!1;b=u(b.variants);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=e.allowedByApplication;e.allowedByApplication=Pf(e,c,a);f!=e.allowedByApplication&&(d=!0)}return d}
function Hi(a,b){var c=Ii(a,b);if(b){var d=a.h?a.h.h:null;if(d&&a.h.C){for(var e=new Set,f=u(b.variants),g=f.next();!g.done;g=f.next())g=g.value,g.audio&&e.add(g.audio),g.video&&e.add(g.video);e=u(e);for(f=e.next();!f.done;f=e.next())Ji(a,d.keySystem,f.value)}Ki(a,b)}return c}function Ji(a,b,c){c=u(c.drmInfos);for(var d=c.next();!d.done;d=c.next())if(d=d.value,d.keySystem==b){d=u(d.initData||[]);for(var e=d.next();!e.done;e=d.next())e=e.value,bi(a.h,e.initDataType,e.initData)}}
function Ki(a,b){a=a.h?a.h.wf():{};var c=Object.keys(a);c=c.length&&c[0]=="00";var d=!1,e=!1,f=new Set,g=new Set,h=new Set;b=u(b.variants);for(var k=b.next();!k.done;k=b.next())k=k.value,k.audio&&h.add(k.audio),k.video&&h.add(k.video),k.allowedByApplication?k.allowedByKeySystem&&(d=!0):e=!0;h=u(h);for(b=h.next();!b.done;b=h.next())if(b=b.value,b.keyIds.size)for(b=u(b.keyIds),k=b.next();!k.done;k=b.next()){k=k.value;var l=a[c?"00":k];l?Li.includes(l)&&g.add(l):f.add(k)}if(!d)throw a={hasAppRestrictions:e,
missingKeys:Array.from(f),restrictedKeyStatuses:Array.from(g)},new U(2,4,4012,a);}var Li=["output-restricted","internal-error"];function Mi(){}function Ni(a,b){Oi.set(a,b)}function Pi(){var a={};Tb();if(Qi())for(var b=u(Oi.keys()),c=b.next();!c.done;c=b.next())a[c.value]=!0;b=u(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(c=b.next();!c.done;c=b.next())c=c.value,a[c]=Qi()?Oi.has(c):Ri().canPlayType(c)!="";return a}function Si(a,b){if(b){var c=Oi.get(b.toLowerCase());if(c)return c}throw new U(2,4,4E3,a,b);}S("shaka.media.ManifestParser",Mi);
Mi.unregisterParserByMime=function(a){Oi.delete(a)};Mi.registerParserByMime=Ni;Mi.registerParserByExtension=function(){bd("ManifestParser.registerParserByExtension","Please use an ManifestParser with registerParserByMime function.")};Mi.AccessibilityPurpose={Xn:"visually impaired",jn:"hard of hearing",Gn:"spoken subtitles"};var Oi=new Map;S("shaka.config.CodecSwitchingStrategy",{RELOAD:"reload",SMOOTH:"smooth"});function Ti(a,b){var c=null,d=null,e=null,f=null,g=a.$();b&1&&(e=a.Ud());b&2&&(f=a.$());b&8&&(c=a.$());b&16&&(d=a.$());return{trackId:g,me:c,oe:d,wk:e,Kj:f}}function Ui(a,b){return b==1?(b=a.$(),a=a.$(),{baseMediaDecodeTime:b*4294967296+a}):{baseMediaDecodeTime:a.$()}}function Vi(a,b){b==1?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));b=a.$();a.skip(4);a=a.Ia();return{timescale:b,language:String.fromCharCode((a>>10)+96)+String.fromCharCode(((a&960)>>5)+96)+String.fromCharCode((a&31)+96)}}
function Wi(a,b,c){var d=a.$(),e=[],f=null;c&1&&(f=a.Sh());c&4&&a.skip(4);for(var g=0;g<d;g++){var h={$h:null,sampleSize:null,eg:null};c&256&&(h.$h=a.$());c&512&&(h.sampleSize=a.$());c&1024&&a.skip(4);c&2048&&(h.eg=b==0?a.$():a.Sh());e.push(h)}return{qo:d,Zh:e,Vg:f}}function Xi(a){a.skip(6);a.skip(2);a.skip(8);var b=a.Ia();a.skip(2);a.skip(2);a.skip(2);a=a.Ia()+a.Ia()/65536;return{channelCount:b,sampleRate:a}}function Yi(a){a=a.$();return{codec:Ch(a)}}
function Zi(a){var b=null,c=null,d=a.cc(4,!1);var e=String.fromCharCode(d[0]);e+=String.fromCharCode(d[1]);e+=String.fromCharCode(d[2]);e+=String.fromCharCode(d[3]);if(e==="nclx"){switch(a.Ia()){case 1:case 5:case 6:case 7:b="srgb";break;case 9:b="rec2020";break;case 11:case 12:b="p3"}d=a.Ia();a.Ia();switch(d){case 1:case 6:case 13:case 14:case 15:c="SDR";break;case 16:c="PQ";break;case 18:c="HLG"}}return{colorGamut:b,Pe:c}}
function $i(a,b){b=b===void 0?!1:b;a=a.toString(16).toUpperCase();return b?a:("0"+a).slice(-2)}function aj(a){return(a<10?"0":"")+a};function bj(a){this.g=a}
function cj(a){for(var b=[],c=u(a.g),d=c.next();!d.done;d=c.next()){var e=b,f=e.push;var g=d.value;d=dj;var h=g.id+1;var k=g.stream.width||0,l=g.stream.height||0;g.type=="audio"&&(l=k=0);var m=g.duration*g.timescale,n=Math.floor(m/(ej+1));m=Math.floor(m%(ej+1));h=new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(x(fj(h,4)),[0,0,0,0],x(fj(n,4)),x(fj(m,4)),[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0],x(fj(k,2)),[0,0],x(fj(l,
2)),[0,0]));h=dj("tkhd",h);k=dj;n=g.duration*g.timescale;l=Math.floor(n/(ej+1));n=Math.floor(n%(ej+1));m=g.stream.language;m=m.charCodeAt(0)-96<<10|m.charCodeAt(1)-96<<5|m.charCodeAt(2)-96;l=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(x(fj(g.timescale,4)),x(fj(l,4)),x(fj(n,4)),x(fj(m,2)),[0,0]));l=dj("mdhd",l);n=g;m=new Uint8Array([]);switch(n.type){case "video":m=gj.value();break;case "audio":m=hj.value()}n=dj("hdlr",m);a:{switch(g.type){case "video":g=dj("minf",dj("vmhd",ij.value()),
jj.value(),kj(g));break a;case "audio":g=dj("minf",dj("smhd",lj.value()),jj.value(),kj(g));break a}g=new Uint8Array([])}g=k("mdia",l,n,g);d=d("trak",h,g);f.call(e,d)}b=oc.apply(fc,x(b));f=a.g[0];c=dj;d=f.duration*f.timescale;e=Math.floor(d/(ej+1));d=Math.floor(d%(ej+1));e=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(x(fj(f.timescale,4)),x(fj(e,4)),x(fj(d,4)),[0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]));e=dj("mvhd",e);d=[];a=u(a.g);for(k=a.next();!k.done;k=a.next())g=d,h=g.push,k=new Uint8Array([0,0,0,0].concat(x(fj(k.value.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),k=dj("trex",k),h.call(g,k);a=oc.apply(fc,x(d));a=dj("mvex",a);d=[];if(f.encrypted){f=u(f.stream.drmInfos);for(g=f.next();!g.done;g=f.next())if(g=g.value,g.initData)for(g=u(g.initData),h=g.next();!h.done;h=g.next())d.push(h.value.initData);f=oc.apply(fc,x(d))}else f=new Uint8Array([]);
a=c("moov",e,b,a,f);b=mj.value();c=new Uint8Array(b.byteLength+a.byteLength);c.set(b);c.set(a,b.byteLength);return c}
function kj(a){var b=dj,c="aac";a.codecs.includes("mp3")?c="mp3":a.codecs.includes("ac-3")?c=Tb().Ie()?"ec-3":"ac-3":a.codecs.includes("ec-3")?c="ec-3":a.codecs.includes("opus")&&(c="opus");var d=new Uint8Array([]);switch(a.type){case "video":if(a.codecs.includes("avc1")){c=a.stream.width||0;d=a.stream.height||0;if(a.Ya.byteLength>0)var e=dj("avcC",a.Ya);else{e=dj;for(var f=7,g=[],h=[],k=0,l=0,m=0,n=0;n<a.Jb.length;n++){var q=nj(a.Jb[n]);switch(q[0]&31){case 7:g.push(q);f+=q.length+2;break;case 8:h.push(q),
f+=q.length+2}}g.length>0&&(k=g[0][1],m=g[0][2],l=g[0][3]);f=new Uint8Array(f);n=0;f[n++]=1;f[n++]=k;f[n++]=m;f[n++]=l;f[n++]=255;f[n++]=224|g.length;for(k=0;k<g.length;k++)f[n++]=(g[k].length&65280)>>8,f[n++]=g[k].length&255,f.set(g[k],n),n+=g[k].length;f[n++]=h.length;for(g=0;g<h.length;g++)f[n++]=(h[g].length&65280)>>8,f[n++]=h[g].length&255,f.set(h[g],n),n+=h[g].length;e=e("avcC",f)}c=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].concat(x(fj(c,2)),x(fj(d,2)),[0,72,0,0,0,72,
0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]));d="avc1";h=oj(a);g=new Uint8Array([]);a.encrypted&&(g=pj(a.stream,a.codecs),d="encv");d=dj(d,c,e,h,g)}else a.codecs.includes("hvc1")&&(d=a.stream.width||0,e=a.stream.height||0,c=new Uint8Array([]),a.Ya.byteLength>0&&(c=dj("hvcC",a.Ya)),d=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].concat(x(fj(d,2)),x(fj(e,2)),[0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,
100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17])),e="hvc1",h=oj(a),g=new Uint8Array([]),a.encrypted&&(g=pj(a.stream,a.codecs),e="encv"),d=dj(e,d,c,h,g));break;case "audio":if(c=="mp3")a=dj(".mp3",qj(a));else if(c=="ac-3")c=dj("dac3",a.Ma),d="ac-3",e=new Uint8Array([]),a.encrypted&&(e=pj(a.stream,a.codecs),d="enca"),a=dj(d,qj(a),c,e);else if(c=="ec-3")c=dj("dec3",a.Ma),d="ec-3",e=new Uint8Array([]),a.encrypted&&(e=pj(a.stream,a.codecs),d="enca"),
a=dj(d,qj(a),c,e);else if(c=="opus")c=dj("dOps",a.Ma),d="Opus",e=new Uint8Array([]),a.encrypted&&(e=pj(a.stream,a.codecs),d="enca"),a=dj(d,qj(a),c,e);else{if(a.Ma.byteLength>0)c=dj("esds",a.Ma);else{c=dj;d=a.id+1;e=a.stream.channelsCount||2;g=a.stream.audioSamplingRate||44100;k=sc("audio",a.codecs.split(","));l={96E3:0,88200:1,64E3:2,48E3:3,44100:4,32E3:5,24E3:6,22050:7,16E3:8,12E3:9,11025:10,8E3:11,7350:12};h=l[g];if(k==="mp4a.40.5"||k==="mp4a.40.29")h=l[g*2];g=parseInt(k.split(".").pop(),10);d=
new Uint8Array([0,0,0,0,3,25].concat(x(fj(d,2)),[0,4,17,64,21,0,0,0,0,0,0,0,0,0,0,0,5,2,g<<3|h>>>1,h<<7|e<<3,6,1,2]));c=c("esds",d)}d="mp4a";e=new Uint8Array([]);a.encrypted&&(e=pj(a.stream,a.codecs),d="enca");a=dj(d,qj(a),c,e)}d=a}a=dj("stsd",rj.value(),d);return b("stbl",a,dj("stts",sj.value()),dj("stsc",tj.value()),dj("stsz",uj.value()),dj("stco",vj.value()))}
function oj(a){if(!a.eb&&!a.gb)return new Uint8Array([]);var b=a.gb;a=new Uint8Array([].concat(x(fj(a.eb,4)),x(fj(b,4))));return dj("pasp",a)}function qj(a){return new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,a.stream.channelsCount||2,0,16,0,0,0,0].concat(x(fj(a.stream.audioSamplingRate||44100,2)),[0,0]))}
function pj(a,b){var c=dj;b=new Uint8Array([].concat(x(fj(wj(b.split(".")[0]),4))));b=dj("frma",b);var d="cenc";var e=a.drmInfos[0];e&&e.encryptionScheme&&(d=e.encryptionScheme);d=new Uint8Array([0,0,0,0].concat(x(fj(wj(d),4)),[0,1,0,0]));d=dj("schm",d);e=dj;var f=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);a=u(a.drmInfos);for(var g=a.next();!g.done;g=a.next())if((g=g.value)&&g.keyIds&&g.keyIds.size){g=u(g.keyIds);for(var h=g.next();!h.done;h=g.next())f=nj(h.value)}a=new Uint8Array([0,0,0,0,
0,0,1,8]);f=dj("tenc",a,f);return c("sinf",b,d,e("schi",f))}
function xj(a){var b=[];a=u(a.g);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=b.push,e=d.apply;var f=dj;var g=new Uint8Array([0,0,0,0].concat(x(fj(c.data?c.data.sequenceNumber:0,4))));g=dj("mfhd",g);var h;var k=c.data?c.data.Hb:[];var l=new Uint8Array(4+k.length);for(h=0;h<k.length;h++){var m=k[h].flags;l[h+4]=m.sb<<4|m.xb<<2|m.ub}k=dj("sdtp",l);var n=k.length+32+20+8+16+8+8;l=dj;h=new Uint8Array([0,0,0,58].concat(x(fj(c.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0]));h=dj("tfhd",h);m=c.data?
c.data.baseMediaDecodeTime:0;var q=Math.floor(m%(ej+1));m=new Uint8Array([1,0,0,0].concat(x(fj(Math.floor(m/(ej+1)),4)),x(fj(q,4))));m=dj("tfdt",m);var r=n;n=c.data?c.data.Hb:[];q=n.length;var t=12+16*q,v=new Uint8Array(t);r+=8+t;v.set([c.type==="video"?1:0,0,15,1].concat(x(fj(q,4)),x(fj(r,4))),0);for(r=0;r<q;r++){var w=n[r];t=fj(w.duration,4);var z=fj(w.size,4),y=w.flags;w=fj(w.Db,4);v.set([].concat(x(t),x(z),[y.Fb<<2|y.sb,y.xb<<6|y.ub<<4|y.Gb,y.rb&61440,y.rb&15],x(w)),12+16*r)}n=dj("trun",v);k=
l("traf",h,m,n,k);f=f("moof",g,k);e.call(d,b,[f,yj(c)])}return oc.apply(fc,x(b))}function yj(a){a=(a.data?a.data.Hb:[]).map(function(b){return b.data});a=oc.apply(fc,x(a));return dj("mdat",a)}function fj(a,b){var c=[];for(--b;b>=0;b--)c.push(a>>8*b&255);return c}function nj(a){for(var b=new Uint8Array(a.length/2),c=0;c<a.length/2;c+=1)b[c]=parseInt(String(a[c*2]+a[c*2+1]),16);return b}function wj(a){for(var b=0,c=0;c<a.length;c+=1)b|=a.charCodeAt(c)<<(a.length-c-1)*8;return b}
function dj(a){var b=Na.apply(1,arguments),c=zj.get(a);c||(c=[a.charCodeAt(0),a.charCodeAt(1),a.charCodeAt(2),a.charCodeAt(3)],zj.set(a,c));for(var d=8,e=b.length-1;e>=0;e--)d+=b[e].byteLength;e=new Uint8Array(d);e[0]=d>>24&255;e[1]=d>>16&255;e[2]=d>>8&255;e[3]=d&255;e.set(c,4);c=0;for(d=8;c<b.length;c++)e.set(b[c],d),d+=b[c].byteLength;return e}
var ej=4294967295,zj=new Map,gj=new Sb(function(){return new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0])}),hj=new Sb(function(){return new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0])}),sj=new Sb(function(){return new Uint8Array([0,0,0,0,0,0,0,0])}),tj=new Sb(function(){return new Uint8Array([0,0,0,0,0,0,0,0])}),vj=new Sb(function(){return new Uint8Array([0,
0,0,0,0,0,0,0])}),uj=new Sb(function(){return new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0])}),ij=new Sb(function(){return new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}),lj=new Sb(function(){return new Uint8Array([0,0,0,0,0,0,0,0])}),rj=new Sb(function(){return new Uint8Array([0,0,0,0,0,0,0,1])}),mj=new Sb(function(){var a=new Uint8Array([105,115,111,109]),b=new Uint8Array([97,118,99,49]),c=new Uint8Array([0,0,0,1]);return dj("ftyp",a,c,a,b)}),jj=new Sb(function(){var a=new Uint8Array([0,0,0,0,0,0,0,1,0,
0,0,12,117,114,108,32,0,0,0,1]);a=dj("dref",a);return dj("dinf",a)});function Aj(a){a=Lb(a);var b=null;(new yh).box("moov",Dh).box("trak",Dh).box("mdia",Dh).box("minf",Dh).box("stbl",Dh).X("stsd",Fh).box("enca",function(c){b=c.reader.h;return Hh(c)}).box("sinf",Dh).box("frma",function(c){c.parser.stop();Yi(c.reader).codec==="ec-3"&&b&&b.getUint16(16)!==2&&b.setUint16(16,2)}).parse(a);return a}
function Bj(a,b,c){function d(r){n.push({box:r,tj:1701733217})}function e(r){n.push({box:r,tj:1701733238})}function f(r){k=!0;r.parser.stop()}function g(r){m.push(r);Dh(r)}var h=b=Lb(b),k=!1,l,m=[],n=[];(new yh).box("moov",g).box("trak",g).box("mdia",g).box("minf",g).box("stbl",g).X("stsd",function(r){l=r;m.push(r);Fh(r)}).X("encv",f).X("enca",f).X("dvav",e).X("dva1",e).X("dvh1",e).X("dvhe",e).X("dvc1",e).X("dvi1",e).X("hev1",e).X("hvc1",e).X("avc1",e).X("avc3",e).X("ac-3",d).X("ec-3",d).X("ac-4",
d).X("Opus",d).X("fLaC",d).X("mp4a",d).parse(b);if(k)return b;if(n.length==0||!l)throw kb(nc(b)),new U(2,3,3019,c);n.reverse();c=u(n);for(var q=c.next();!q.done;q=c.next())q=q.value,h=Cj(a,h,l,q.box,m,q.tj);return Tb().Fj()?(a=new Uint8Array(b.byteLength+h.byteLength),a.set(h),a.set(b,h.byteLength),a):h}
function Dj(a){a=Lb(a);var b=[];(new yh).box("mdat",function(g){b.push(g)}).parse(a);for(var c=[],d=0;d<b.length;d++){var e=b[d-1],f=b[d];c.push(Ej(a.subarray(e?e.start+e.size:0,f.start+f.size)))}return oc.apply(fc,x(c))}
function Ej(a){function b(n){g.push(n);Dh(n)}var c,d,e,f,g=[];(new yh).box("moof",b).box("traf",b).X("tfhd",function(n){c=n;e=Ti(n.reader,n.flags)}).X("trun",function(n){d=n;f=Wi(n.reader,n.version,n.flags)}).parse(a);if(e&&e.Kj!==2){var h=c.start+Eh(c)+4+(e.wk!==null?8:0),k=Pb(a);if(e.Kj!==null)k.setUint32(h,2);else{Fj(a,c.start,c.size+4);var l=k.getUint32(c.start+8);k.setUint32(c.start+8,l|2);f&&f.Vg!==null&&k.setInt32(d.start+Eh(d)+4,f.Vg+4);l=a.subarray(0,h);k=a.subarray(h);a=new Uint8Array(a.byteLength+
4);a.set(l);l=[];for(var m=3;m>=0;m--)l.push(2>>8*m&255);a.set(new Uint8Array(l),h);a.set(k,h+4);h=u(g);for(k=h.next();!k.done;k=h.next())k=k.value,Fj(a,k.start,k.size+4)}}return a}
function Cj(a,b,c,d,e,f){var g=pj(a,d.name),h=b.subarray(d.start,d.start+d.size);a=new Uint8Array(d.size+g.byteLength);a.set(h,0);Pb(a).setUint32(4,f);a.set(g,d.size);Fj(a,0,a.byteLength);f=new Uint8Array(b.byteLength+a.byteLength);d=Tb().Df()?d.start:d.start+d.size;g=b.subarray(d);f.set(b.subarray(0,d));f.set(a,d);f.set(g,d+a.byteLength);b=u(e);for(e=b.next();!e.done;e=b.next())e=e.value,Fj(f,e.start,e.size+a.byteLength);a=Pb(f,c.start);c=Eh(c);b=a.getUint32(c);a.setUint32(c,b+1);return f}
function Fj(a,b,c){a=Pb(a,b);b=a.getUint32(0);b!=0&&(b==1?(a.setUint32(8,c>>32),a.setUint32(12,c&4294967295)):a.setUint32(0,c))}
function Gj(a){function b(e){d.push({start:e.start,size:e.size});Dh(e)}var c=Lb(a),d=[];(new yh).box("moov",b).box("trak",b).box("mdia",b).box("minf",b).box("stbl",b).box("stsd",function(e){d.push({start:e.start,size:e.size});for(var f=Pb(c,e.start),g=0;g<e.size-3;g++){var h=f.getUint32(g);h==1633889587?f.setUint32(g,1700998451):h==1684103987&&f.setUint32(g,1684366131)}}).parse(c);return c};function Hj(a,b,c,d,e,f,g,h){this.S=a;this.startByte=b;this.endByte=c;this.Pd=d===void 0?null:d;this.timescale=e===void 0?null:e;this.h=f===void 0?null:f;this.aesKey=g===void 0?null:g;this.g=this.mimeType=this.codecs=null;this.encrypted=h===void 0?!1:h}Hj.prototype.Uc=function(){return this.startByte};Hj.prototype.Sc=function(){return this.endByte};Hj.prototype.Ke=function(a){this.h=a};Hj.prototype.kc=function(){return this.h};
function Ij(a,b){return a===b?!0:a&&b?a.Uc()==b.Uc()&&a.Sc()==b.Sc()&&Vc(a.S().sort(),b.S().sort())&&Kb(a.kc(),b.kc()):a==b}S("shaka.media.InitSegmentReference",Hj);Hj.prototype.getEndByte=Hj.prototype.Sc;Hj.prototype.getStartByte=Hj.prototype.Uc;
function Jj(a,b,c,d,e,f,g,h,k,l,m,n,q,r,t,v){l=l===void 0?[]:l;r=r===void 0?Kj:r;this.startTime=a;this.j=this.endTime=b;this.D=c;this.startByte=d;this.endByte=e;this.ia=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.g=l;this.tilesLayout=m===void 0?"":m;this.C=n===void 0?null:n;this.h=q===void 0?null:q;this.status=r;this.preload=!1;this.l=!0;this.u=!1;this.aesKey=t===void 0?null:t;this.thumbnailSprite=null;this.i=-1;this.m=v===void 0?!1:v;this.ze=this.od=!1;a=u(this.g);
for(b=a.next();!b.done;b=a.next())b.value.pj();this.m&&this.g.length&&this.g[this.g.length-1].oj();this.A=this.bandwidth=this.mimeType=this.codecs=null;this.F=!1}p=Jj.prototype;p.S=function(){return this.D()};p.getStartTime=function(){return this.startTime};p.Tk=function(){return this.endTime};p.Uc=function(){return this.startByte};p.Sc=function(){return this.endByte};
function Lj(a){if(a.endByte)return a.endByte+1-a.startByte;if(a.bandwidth){var b=a.bandwidth*(a.endTime-a.startTime);if(!isNaN(b)&&b>0)return b}if(a.g.length>0&&a.m)for(a=u(a.g),a=a.next();!a.done;a=a.next()){Lj(a.value);break}return null}p.Bl=function(){return this.tilesLayout};p.Al=function(){return this.C};p.Vc=function(){return this.status};p.Yl=function(){this.status=Mj};p.Jh=function(){this.preload=!0};p.isPreload=function(){return this.preload};p.Od=function(){this.l=!1};p.Ol=function(){return this.l};
p.pj=function(){this.od=!0};p.Ql=function(){return this.od};p.oj=function(){this.ze=!0};p.Pl=function(){return this.ze};p.nj=function(){this.u=!0};p.Jl=function(){return this.u};p.lg=function(a){this.thumbnailSprite=a};p.zl=function(){return this.thumbnailSprite};p.offset=function(a){this.startTime+=a;this.endTime+=a;this.j+=a;for(var b=u(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.j+=a};
p.pi=function(a){this.h==null?ab("Sync attempted without sync time!"):(a=this.h-a-this.startTime,Math.abs(a)>=.001&&this.offset(a))};p.Ke=function(a,b){this.A=a;this.F=b===void 0?!1:b};p.kc=function(a){var b=this.A;(a===void 0||a)&&this.F&&(this.A=null);return b};function Nj(a,b){a.ia=b;a=u(a.g);for(var c=a.next();!c.done;c=a.next())Nj(c.value,b)}S("shaka.media.SegmentReference",Jj);Jj.prototype.getSegmentData=Jj.prototype.kc;Jj.prototype.setSegmentData=Jj.prototype.Ke;Jj.prototype.syncAgainst=Jj.prototype.pi;
Jj.prototype.offset=Jj.prototype.offset;Jj.prototype.getThumbnailSprite=Jj.prototype.zl;Jj.prototype.setThumbnailSprite=Jj.prototype.lg;Jj.prototype.hasByterangeOptimization=Jj.prototype.Jl;Jj.prototype.markAsByterangeOptimization=Jj.prototype.nj;Jj.prototype.isLastPartial=Jj.prototype.Pl;Jj.prototype.markAsLastPartial=Jj.prototype.oj;Jj.prototype.isPartial=Jj.prototype.Ql;Jj.prototype.markAsPartial=Jj.prototype.pj;Jj.prototype.isIndependent=Jj.prototype.Ol;Jj.prototype.markAsNonIndependent=Jj.prototype.Od;
Jj.prototype.isPreload=Jj.prototype.isPreload;Jj.prototype.markAsPreload=Jj.prototype.Jh;Jj.prototype.markAsUnavailable=Jj.prototype.Yl;Jj.prototype.getStatus=Jj.prototype.Vc;Jj.prototype.getTileDuration=Jj.prototype.Al;Jj.prototype.getTilesLayout=Jj.prototype.Bl;Jj.prototype.getEndByte=Jj.prototype.Sc;Jj.prototype.getStartByte=Jj.prototype.Uc;Jj.prototype.getEndTime=Jj.prototype.Tk;Jj.prototype.getStartTime=Jj.prototype.getStartTime;Jj.prototype.getUris=Jj.prototype.S;var Kj=0,Mj=1;
Jj.Status={Pm:Kj,Vn:Mj,un:2};function Oj(a){return a.length==1&&a.end(0)-a.start(0)<1E-4}function Pj(a){return!a||Oj(a)?null:a.length==1&&a.start(0)<0?0:a.length?a.start(0):null}function Qj(a){return!a||Oj(a)?null:a.length?a.end(a.length-1):null}function Rj(a,b){return!a||!a.length||Oj(a)||b>a.end(a.length-1)?!1:b>=a.start(0)}function Sj(a,b){if(!a||!a.length||Oj(a))return 0;var c=0;a=u(Tj(a));for(var d=a.next();!d.done;d=a.next()){var e=d.value;d=e.start;e=e.end;e>b&&(c+=e-Math.max(d,b))}return c}
function Uj(a,b,c){if(!a||!a.length||Oj(a))return null;a=Tj(a).findIndex(function(d,e,f){return d.start>b&&(e==0||f[e-1].end-b<=c)});return a>=0?a:null}function Tj(a){if(!a)return[];for(var b=[],c=0;c<a.length;c++)b.push({start:a.start(c),end:a.end(c)});return b};function Vj(){}function W(a){return document.createElement(a)}function Wj(a){return document.createElementNS("http://www.w3.org/2000/svg",a)}function Xj(){var a=document.createElement("button");a.setAttribute("type","button");return a}function Yj(a,b){var c=document.createElement("source");c.src=a;c.type=b===void 0?"":b;return c}function Zj(a){for(var b=!1,c=a.getElementsByTagName("source"),d=c.length-1;d>=0;--d)a.removeChild(c[d]),b=!0;a.src&&(a.removeAttribute("src"),b=!0);return b}
function ak(a){a=a.getElementsByClassName("shaka-overflow-quality-mark");return a.length?a[0]:null}function bk(a){for(;a.firstChild;)a.removeChild(a.firstChild)}function Ri(){if(ck)return ck;dk||(dk=new Gf(function(){ck=null}));(ck=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(ck=document.createElement("video"));dk.Y(1);return ck}
function ek(a,b){var c,d,e,f,g;return Q(function(h){if(h.g==1)return"fonts"in document&&"FontFace"in window?E(h,document.fonts.ready,2):h.return();if(!("entries"in document.fonts))return h.return();c=function(k){k=k.entries();for(var l=[],m=k.next();m.done===!1;)l.push(m.value),m=k.next();return l};d=u(c(document.fonts));for(e=d.next();!e.done;e=d.next())if(f=e.value,f.family===a&&f.display==="swap")return h.return();g=new FontFace(a,"url("+b+")",{display:"swap"});document.fonts.add(g);H(h)})}
S("shaka.util.Dom",Vj);Vj.removeAllChildren=bk;Vj.clearSourceFromVideo=Zj;var dk=null,ck=null;/*
 @license
 Shaka Player
 Copyright 2022 Google LLC
 SPDX-License-Identifier: Apache-2.0
*/
function fk(){}function gk(a,b){return b+10<=a.length&&a[b]===73&&a[b+1]===68&&a[b+2]===51&&a[b+3]<255&&a[b+4]<255&&a[b+6]<128&&a[b+7]<128&&a[b+8]<128&&a[b+9]<128?!0:!1}function hk(a,b){return b+10<=a.length&&a[b]===51&&a[b+1]===68&&a[b+2]===73&&a[b+3]<255&&a[b+4]<255&&a[b+6]<128&&a[b+7]<128&&a[b+8]<128&&a[b+9]<128?!0:!1}function ik(a,b){var c=(a[b]&127)<<21;c|=(a[b+1]&127)<<14;c|=(a[b+2]&127)<<7;return c|=a[b+3]&127}
function jk(a){var b={key:a.type,description:"",data:"",mimeType:null,pictureType:null};if(a.type==="APIC"){if(a.size<2||a.data[0]!==3)return null;var c=a.data.subarray(1).indexOf(0);if(c===-1)return null;var d=Yb(Lb(a.data,1,c)),e=a.data[2+c],f=a.data.subarray(3+c).indexOf(0);if(f===-1)return null;var g=Yb(Lb(a.data,3+c,f)),h;d==="--\x3e"?h=Yb(Lb(a.data,4+c+f)):h=Mb(a.data.subarray(4+c+f));b.mimeType=d;b.pictureType=e;b.description=g;b.data=h;return b}if(a.type==="TXXX"){if(a.size<2||a.data[0]!==
3)return null;d=a.data.subarray(1).indexOf(0);if(d===-1)return null;c=Yb(Lb(a.data,1,d));a=Yb(Lb(a.data,2+d)).replace(/\0*$/,"");b.description=c;b.data=a;return b}if(a.type==="WXXX"){if(a.size<2||a.data[0]!==3)return null;d=a.data.subarray(1).indexOf(0);if(d===-1)return null;c=Yb(Lb(a.data,1,d));a=Yb(Lb(a.data,2+d)).replace(/\0*$/,"");b.description=c;b.data=a;return b}if(a.type==="PRIV"){if(a.size<2)return null;c=a.data.indexOf(0);if(c===-1)return null;c=Yb(Lb(a.data,0,c));b.description=c;c=="com.apple.streaming.transportStreamTimestamp"?
(c=a.data.subarray(c.length+1),a=c[3]&1,c=(c[4]<<23)+(c[5]<<15)+(c[6]<<7)+c[7],c/=45,a&&(c+=4.772185884E7),b.data=c):(a=Mb(a.data.subarray(c.length+1)),b.data=a);return b}if(a.type[0]==="T"){if(a.size<2||a.data[0]!==3)return null;a=Yb(a.data.subarray(1)).replace(/\0*$/,"");b.data=a;return b}return a.type[0]==="W"?(a=Yb(a.data).replace(/\0*$/,""),b.data=a,b):a.data?(b.data=Mb(a.data),b):null}
function kk(a){for(var b=0,c=[];gk(a,b);){var d=ik(a,b+6);a[b+5]>>6&1&&(b+=10);b+=10;for(d=b+d;b+10<d;){var e=a.subarray(b),f=ik(e,4);e={type:String.fromCharCode(e[0],e[1],e[2],e[3]),size:f,data:e.subarray(10,10+f)};(f=jk(e))&&c.push(f);b+=e.size+10}hk(a,b)&&(b+=10)}return c}function lk(a,b){for(var c=b=b===void 0?0:b,d=0;gk(a,b);)a[b+5]>>6&1&&(d+=10),d+=10,d+=ik(a,b+6),hk(a,b+10)&&(d+=10),b+=d;return d>0?a.subarray(c,c+d):new Uint8Array([])}S("shaka.util.Id3Utils",fk);fk.getID3Data=lk;
fk.getID3Frames=kk;function mk(a){return(new Date(Date.UTC(1900,0,1,0,0,0,0)+a)).getTime()};/*

 Copyright Brightcove, Inc.

 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
*/
function nk(a,b){this.j=a;if(b===void 0?0:b){b=new Uint8Array(a.byteLength);for(var c=0,d=0;d<a.byteLength;d++)d>=2&&a[d]==3&&a[d-1]==0&&a[d-2]==0||(b[c]=a[d],c++);this.j=Lb(b,0,c)}this.i=this.j.byteLength;this.g=this.h=0}function ok(a){var b=a.j.byteLength-a.i,c=new Uint8Array(4),d=Math.min(4,a.i);d!==0&&(c.set(a.j.subarray(b,b+d)),a.h=(new vh(c,0)).$(),a.g=d*8,a.i-=d)}function pk(a,b){if(a.g<=b){b-=a.g;var c=Math.floor(b/8);b-=c*8;a.g-=c;ok(a)}a.h<<=b;a.g-=b}
function qk(a,b){var c=Math.min(a.g,b),d=a.h>>>32-c;a.g-=c;a.g>0?a.h<<=c:a.i>0&&ok(a);c=b-c;return c>0?d<<c|qk(a,c):d}function rk(a){var b;for(b=0;b<a.g;++b)if((a.h&2147483648>>>b)!==0)return a.h<<=b,a.g-=b,b;ok(a);return b+rk(a)}function sk(a){pk(a,1+rk(a))}function tk(a){var b=rk(a);return qk(a,b+1)-1}function uk(a){a=tk(a);return 1&a?1+a>>>1:-1*(a>>>1)}function vk(a){return qk(a,1)===1}function wk(a){return qk(a,8)}
function xk(a,b){for(var c=8,d=8,e=0;e<b;e++)d!==0&&(d=uk(a),d=(c+d+256)%256),c=d===0?c:d}function yk(a){wk(a);tk(a);return tk(a)}S("shaka.util.ExpGolomb",nk);function zk(){this.I=null;this.J=!1;this.m=this.K=null;this.j=[];this.g=[];this.D=this.F=null;this.i=[];this.h=[];this.G=null;this.l=[];this.C=this.H=this.u=this.A=null}p=zk.prototype;p.clearData=function(){this.j=[];this.g=[];this.i=[];this.h=[];this.l=[]};p.ig=function(a){this.C!=null&&this.C!=a&&(this.u=this.A=null);this.C=a};
p.parse=function(a){if(a.length<564)return this;for(var b=Math.max(0,Ak(a)),c=a.length-(a.length+b)%188,d=!1,e=b;e<c;e+=188)if(a[e]==71){var f=!!(a[e+1]&64),g=((a[e+1]&31)<<8)+a[e+2];if((a[e+3]&48)>>4>1){var h=e+5+a[e+4];if(h==e+188)continue}else h=e+4;switch(g){case 0:f&&(h+=a[h]+1);this.I=(a[h+10]&31)<<8|a[h+11];break;case 17:case 8191:break;case this.I:f&&(h+=a[h]+1);f=a;g={audio:-1,video:-1,Bf:-1,audioCodec:"",videoCodec:""};var k=h+3+((f[h+1]&15)<<8|f[h+2])-4;for(h+=12+((f[h+10]&15)<<8|f[h+11]);h<
k;){var l=(f[h+1]&31)<<8|f[h+2],m=(f[h+3]&15)<<8|f[h+4];switch(f[h]){case 6:if(m>0)for(var n=h+5,q=m;q>2;){var r=f[n+1]+2;switch(f[n]){case 5:var t=$b(f.subarray(n+2,n+r));g.audio==-1&&t==="Opus"?(g.audio=l,g.audioCodec="opus"):g.video==-1&&t==="AV01"&&(g.video=l,g.videoCodec="av1");break;case 106:g.audio==-1&&(g.audio=l,g.audioCodec="ac3");break;case 122:g.audio==-1&&(g.audio=l,g.audioCodec="ec3");break;case 124:g.audio==-1&&(g.audio=l,g.audioCodec="aac");break;case 127:g.audioCodec=="opus"&&(t=
null,f[n+2]===128&&(t=f[n+3]),t!=null&&(this.H={channelCount:(t&15)===0?2:t&15,yk:t,sampleRate:48E3}))}n+=r;q-=r}break;case 15:g.audio==-1&&(g.audio=l,g.audioCodec="aac");break;case 17:g.audio==-1&&(g.audio=l,g.audioCodec="aac-loas");break;case 21:g.Bf==-1&&(g.Bf=l);break;case 27:g.video==-1&&(g.video=l,g.videoCodec="avc");break;case 3:case 4:g.audio==-1&&(g.audio=l,g.audioCodec="mp3");break;case 36:g.video==-1&&(g.video=l,g.videoCodec="hvc");break;case 129:g.audio==-1&&(g.audio=l,g.audioCodec="ac3");
break;case 132:case 135:g.audio==-1&&(g.audio=l,g.audioCodec="ec3")}h+=m+5}f=g;f.video!=-1&&(this.K=f.video,this.m=f.videoCodec);f.audio!=-1&&(this.F=f.audio,this.D=f.audioCodec);f.Bf!=-1&&(this.G=f.Bf);d&&!this.J&&(d=!1,e=b-188);this.J=!0;break;case this.K:h=a.subarray(h,e+188);f?this.j.push([h]):this.j.length&&this.j[this.j.length-1]&&this.j[this.j.length-1].push(h);break;case this.F:h=a.subarray(h,e+188);f?this.i.push([h]):this.i.length&&this.i[this.i.length-1]&&this.i[this.i.length-1].push(h);
break;case this.G:h=a.subarray(h,e+188);f?this.l.push([h]):this.l.length&&this.l[this.l.length-1]&&this.l[this.l.length-1].push(h);break;default:d=!0}}return this};
function Bk(a,b){if((b[0]<<16|b[1]<<8|b[2])!==1)return null;var c={data:new Uint8Array(0),packetLength:b[4]<<8|b[5],pts:null,dts:null,nalus:[]};if(c.packetLength&&c.packetLength>b.byteLength-6)return null;var d=b[7];if(d&192){var e=(b[9]&14)*536870912+(b[10]&255)*4194304+(b[11]&254)*16384+(b[12]&255)*128+(b[13]&254)/2;a.A==null&&(a.A=e);c.pts=Ck(e,a.A);a.A=c.pts;c.dts=c.pts;d&64&&(d=(b[14]&14)*536870912+(b[15]&255)*4194304+(b[16]&254)*16384+(b[17]&255)*128+(b[18]&254)/2,a.u==null&&(a.u=d),c.dts=c.pts!=
e?Ck(d,a.u):d);a.u=c.dts}a=b[8]+9;if(b.byteLength<=a)return null;c.data=b.subarray(a);return c}p.gm=function(a){bd("TsParser.parseAvcNalus","Please use parseNalus function instead.");return this.Ph(a,{Ce:null,state:null})};
p.Ph=function(a,b){var c=a.pts?a.pts/9E4:null;a=a.data;var d=a.byteLength,e=1;this.m=="hvc"&&(e=2);var f=b.state||0,g=f,h=0,k=[],l=-1,m=0;f==-1&&(l=0,m=this.m=="hvc"?a[0]>>1&63:a[0]&31,f=0,h=1);for(;h<d;){var n=a[h++];if(f)if(f===1)f=n?0:2;else if(n)if(n==1){n=h-f-1;if(l>=0)k.push({data:a.subarray(l+e,n),fullData:a.subarray(l,n),type:m,time:c,state:null});else if(f=k.length?k[k.length-1]:b.Ce)g&&h<=4-g&&f.state&&(f.data=f.data.subarray(0,f.data.byteLength-g),f.fullData=f.fullData.subarray(0,f.fullData.byteLength-
g)),n>0&&(n=a.subarray(0,n),f.data=oc(f.data,n),f.fullData=oc(f.fullData,n),f.state=0);h<d?(m=this.m=="hvc"?a[h]>>1&63:a[h]&31,l=h,f=0):f=-1}else f=0;else f=3;else f=n?0:1}l>=0&&f>=0&&k.push({data:a.subarray(l+e,d),fullData:a.subarray(l,d),type:m,time:c,state:f});!k.length&&b.Ce&&(c=k.length?k[k.length-1]:b.Ce)&&(c.data=oc(c.data,a),c.fullData=oc(c.fullData,a));b.state=f;return k};
p.getMetadata=function(){for(var a=[],b=u(this.l),c=b.next();!c.done;c=b.next())c=oc.apply(fc,x(c.value)),(c=Bk(this,c))&&a.push({cueTime:c.pts?c.pts/9E4:null,data:c.data,frames:kk(c.data),dts:c.dts,pts:c.pts});return a};
p.Eb=function(){if(this.i.length&&!this.h.length)for(var a=u(this.i),b=a.next();!b.done;b=a.next()){var c=oc.apply(fc,x(b.value)),d=Bk(this,c);b=this.h.length?this.h[this.h.length-1]:null;d&&d.pts!=null&&d.dts!=null&&(!b||b.pts!=d.pts&&b.dts!=d.dts)?this.h.push(d):this.h.length&&(c=d?d.data:c)&&(b=this.h.pop(),b.data=oc(b.data,c),this.h.push(b))}return this.h};
p.Kd=function(a){a=a===void 0?!0:a;if(this.j.length&&!this.g.length){for(var b=u(this.j),c=b.next();!c.done;c=b.next()){var d=oc.apply(fc,x(c.value)),e=Bk(this,d);c=this.g.length?this.g[this.g.length-1]:null;e&&e.pts!=null&&e.dts!=null&&(!c||c.pts!=e.pts&&c.dts!=e.dts)?this.g.push(e):this.g.length&&(d=e?e.data:d)&&(c=this.g.pop(),c.data=oc(c.data,d),this.g.push(c))}if(a){b={Ce:null,state:null};c=[];d=u(this.g);for(e=d.next();!e.done;e=d.next())e=e.value,e.nalus=this.Ph(e,b),e.nalus.length&&(c.push(e),
b.Ce=e.nalus[e.nalus.length-1]);this.g=c}}return a?this.g:(a=this.g,this.g=[],a)};p.getStartTime=function(a){if(a=="audio"){a=null;var b=this.Eb();b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4);return a}return a=="video"?(a=null,b=this.Kd(!1),b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4),a):null};p.pe=function(){return{audio:this.D,video:this.m}};p.Af=function(){for(var a=[],b=u(this.Kd()),c=b.next();!c.done;c=b.next())a.push.apply(a,x(c.value.nalus));return a};
p.Gl=function(){bd("TsParser.getVideoResolution","Please use getVideoInfo function instead.");var a=this.yh();return{height:a.height,width:a.width}};p.yh=function(){return this.m=="hvc"?Dk(this):Ek(this)};function Fk(a){var b=a.Kd();return b.length>1&&(a=b[0].pts,b=b[1].pts,!isNaN(b-a))?String(Math.abs(1/(b-a)*9E4)):null}
function Ek(a){var b={height:null,width:null,codec:null,frameRate:null},c=a.Af();if(!c.length)return b;c=c.find(function(r){return r.type==7});if(!c)return b;c=new nk(c.data);var d=wk(c),e=wk(c),f=wk(c);sk(c);if(Gk.includes(d)){var g=tk(c);g===3&&pk(c,1);sk(c);sk(c);pk(c,1);if(vk(c)){g=g!==3?8:12;for(var h=0;h<g;h++)vk(c)&&(h<6?xk(c,16):xk(c,64))}}sk(c);g=tk(c);if(g===0)tk(c);else if(g===1)for(pk(c,1),sk(c),sk(c),g=tk(c),h=0;h<g;h++)sk(c);sk(c);pk(c,1);g=tk(c);h=tk(c);var k=qk(c,1);k===0&&pk(c,1);
pk(c,1);var l=0,m=0,n=0,q=0;vk(c)&&(l=tk(c),m=tk(c),n=tk(c),q=tk(c));b.height=String((2-k)*(h+1)*16-n*2-q*2);b.width=String((g+1)*16-l*2-m*2);b.codec="avc1."+("0"+d.toString(16).toUpperCase()).slice(-2)+("0"+e.toString(16).toUpperCase()).slice(-2)+("0"+f.toString(16).toUpperCase()).slice(-2);b.frameRate=Fk(a);return b}
function Dk(a){var b={height:null,width:null,codec:null,frameRate:null},c=a.Af();if(!c.length)return b;c=c.find(function(F){return F.type==33});if(!c)return b;var d=new nk(c.fullData,!0);wk(d);wk(d);qk(d,4);var e=qk(d,3);vk(d);var f=qk(d,2),g=qk(d,1),h=qk(d,5),k=qk(d,32);c=wk(d);for(var l=wk(d),m=wk(d),n=wk(d),q=wk(d),r=wk(d),t=wk(d),v=[],w=[],z=0;z<e;z++)v.push(vk(d)),w.push(vk(d));if(e>0)for(z=e;z<8;z++)qk(d,2);for(z=0;z<e;z++)v[z]&&qk(d,88),w[z]&&wk(d);tk(d);e=tk(d);e==3&&qk(d,1);v=tk(d);w=tk(d);
var y=z=0,A=0,C=0;vk(d)&&(z+=tk(d),y+=tk(d),A+=tk(d),C+=tk(d));b.width=String(v-(z+y)*(e===1||e===2?2:1));b.height=String(w-(A+C)*(e===1?2:1));d=function(F){for(var D=0,B=0;B<32;B++)D|=(F>>B&1)<<31-B;return D>>>0}(k);g=g==1?"H":"L";f="hvc1"+("."+["","A","B","C"][f]+h);f+="."+d.toString(16).toUpperCase();f+="."+g+t;r&&(f+="."+r.toString(16).toUpperCase());q&&(f+="."+q.toString(16).toUpperCase());n&&(f+="."+n.toString(16).toUpperCase());m&&(f+="."+m.toString(16).toUpperCase());l&&(f+="."+l.toString(16).toUpperCase());
c&&(f+="."+c.toString(16).toUpperCase());b.codec=f;b.frameRate=Fk(a);return b}function Ck(a,b){var c=1;for(a>b&&(c=-1);Math.abs(b-a)>4294967296;)a+=c*8589934592;return a}function Hk(a){return Ak(a)<0?!1:!0}function Ak(a){for(var b=Math.min(1E3,a.length-564),c=0;c<b;){if(a[c]==71&&a[c+188]==71&&a[c+376]==71)return c;c++}return-1}S("shaka.util.TsParser",zk);zk.syncOffset=Ak;zk.probe=Hk;zk.prototype.getVideoInfo=zk.prototype.yh;zk.prototype.getVideoResolution=zk.prototype.Gl;
zk.prototype.getVideoNalus=zk.prototype.Af;zk.prototype.getCodecs=zk.prototype.pe;zk.prototype.getStartTime=zk.prototype.getStartTime;zk.prototype.getVideoData=zk.prototype.Kd;zk.prototype.getAudioData=zk.prototype.Eb;zk.prototype.getMetadata=zk.prototype.getMetadata;zk.prototype.parseNalus=zk.prototype.Ph;zk.prototype.parseAvcNalus=zk.prototype.gm;zk.prototype.parse=zk.prototype.parse;zk.prototype.setDiscontinuitySequence=zk.prototype.ig;zk.prototype.clearData=zk.prototype.clearData;
zk.Timescale=9E4;var Gk=[100,110,122,244,44,83,86,118,128,138,139,134];function Ik(a,b,c,d,e){var f=this;this.g=a;this.O=c;this.C=d;this.Z=b;this.l=new Map;this.F=new Map;this.La=new Map;this.ib=new Map;this.h=null;this.Fa=!1;this.H=e||null;this.u=new Map;this.A=new Wc;this.j=new Map;this.J=null;this.L=new Kg;this.ya="";this.pb=!1;this.sa=!0;this.M=!1;this.D=this.P=null;this.i=Jk(this,this.L);this.hb=this.G=!1;this.K=new rh(function(){return Kk(f)});this.I=!1;this.V="UNKNOWN";this.fb=this.jb=!1;this.Na=new Kg;this.m=!1;this.ra=null;this.W=new Map;this.ea=this.R=this.oa=
this.T=null;this.aa=new Kg;this.g.remote&&(this.M=this.g.remote.state!="disconnected",this.A.o(this.g.remote,"connect",function(){f.M=f.g.remote.state!="disconnected"}),this.A.o(this.g.remote,"connecting",function(){f.M=f.g.remote.state!="disconnected"}),this.A.o(this.g.remote,"disconnect",function(){f.M=f.g.remote.state!="disconnected"}))}
function Jk(a,b){a.sa=!0;if(window.ManagedMediaSource){a.D||(a.g.disableRemotePlayback=!0);var c=new ManagedMediaSource;a.A.o(c,"startstreaming",function(){a.sa=!0});a.A.o(c,"endstreaming",function(){a.sa=!1})}else c=new MediaSource;a.A.ua(c,"sourceopen",function(){URL.revokeObjectURL(a.ya);b.resolve()});a.A.ua(a.g,"playing",function(){a.pb=!0});a.ya=Lk(c);a.C.useSourceElements?(a.g.removeAttribute("src"),a.P&&a.g.removeChild(a.P),a.D&&a.g.removeChild(a.D),a.P=Yj(a.ya),a.g.appendChild(a.P),a.D&&a.g.appendChild(a.D),
a.g.load()):a.g.src=a.ya;return c}function Mk(a,b,c){a.g&&window.ManagedMediaSource&&a.i&&a.C.useSourceElements&&(a.D&&a.g.removeChild(a.D),a.D=Yj(b,c),a.g.appendChild(a.D),a.g.disableRemotePlayback=!1)}
function Nk(){var a='video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.20000000.L153.B0",video/mp4; codecs="hvc1.2.4.L120.b0",video/mp4; codecs="hvc1.2.4.L123.b0",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",video/mp4; codecs="dvh1.05.01",video/mp4; codecs="dvh1.08.01",video/mp4; codecs="dav1.10.01",video/mp4; codecs="dvh1.20.01",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="ac-4.02.01.01",audio/mp4; codecs="opus",audio/mp4; codecs="flac",audio/mp4; codecs="dtsc",audio/mp4; codecs="dtse",audio/mp4; codecs="dtsx",audio/mp4; codecs="apac.31.00",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",").concat(x(hf)),b=
{};Tb();a=u(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;if(wf(c))b[c]=!0;else if(Qi()){var d=pf(c),e=bg(qf(c),d);d=gf(d,e);b[c]=jd(d)||(af(d)?!0:!1)}else b[c]=Ri().canPlayType(c)!="";d=c.split(";")[0];b[d]=b[d]||b[c]}return b}p=Ik.prototype;p.destroy=function(){return this.K.destroy()};
function Kk(a){var b,c,d,e,f,g,h,k,l,m,n,q,r,t,v;return Q(function(w){if(w.g==1){b=[];c=u(a.u);for(d=c.next();!d.done;d=c.next())for(e=d.value,f=u(e),g=f.next().value,h=f.next().value,k=h[0],l=g,a.u.set(l,h.slice(0,1)),k&&b.push(k.p.catch(If)),m=u(h.slice(1)),n=m.next();!n.done;n=m.next())q=n.value,q.p.reject(new U(2,7,7003,void 0));a.h&&b.push(a.h.destroy());return E(w,Promise.all(b),2)}r=u(a.j.values());for(t=r.next();!t.done;t=r.next())v=t.value,v.destroy();a.A&&(a.A.release(),a.A=null);a.g&&a.D&&
a.g.removeChild(a.D);a.g&&a.P&&(a.g.removeChild(a.P),a.g.load(),a.g.disableRemotePlayback=!1);a.g=null;a.P=null;a.D=null;a.C=null;a.i=null;a.h=null;a.Z=null;a.l.clear();a.La.clear();a.j.clear();a.J=null;a.u.clear();a.H=null;a.W.clear();a.O=null;H(w)})}
p.init=function(a,b,c,d){b=b===void 0?!1:b;c=c===void 0?"UNKNOWN":c;d=d===void 0?!1:d;var e=this,f,g,h,k,l,m;return Q(function(n){if(n.g==1)return f=xc,E(n,e.L,2);if(n.g!=3){if(!Ok(e)&&!Pk(e))return n.B(3);ab("Expected MediaSource to be open during init(); reopening the media source.");e.L=new Kg;e.i=Jk(e,e.L);return E(n,e.L,3)}e.I=b;e.V=c;e.jb=d;e.fb=!e.I&&e.V=="HLS"&&!e.jb;e.W.clear();e.T=null;e.oa=null;e.R=null;e.ea=null;e.aa=new Kg;g=u(a.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=a.get(k),
Rk(e,k,l,l.codecs),e.m?(e.u.set(f.na,[]),e.u.set(f.Ha,[])):e.u.set(k,[]);(m=a.get(f.na))&&m.isAudioMuxedInVideo&&(e.m=!0);H(n)})};
function Rk(a,b,c,d){b=="audio"&&d&&(d=bg(d,c.mimeType));var e=gf(c.mimeType,d);if(b==vc)Sk(a,e,a.I,c.external);else{var f=a.C.forceTransmux;if(!jd(e)||!a.I&&hf.includes(e))f=!0;var g=jf(c.mimeType,d);if(f){f=tc("audio",(d||"").split(","));d=tc("video",(d||"").split(","));if(f&&d){a.m=!0;Rk(a,"audio",c,f);Rk(a,"video",c,d);return}if(d=af(g))e=d(),a.j.set(b,e),e=e.convertCodecs(b,g)}g=e+a.C.addExtraFeaturesToSourceBuffer(e);sh(a.K);try{var h=a.i.addSourceBuffer(g)}catch(k){throw new U(2,3,3015,k,"The mediaSource_ status was "+
a.i.readyState+" expected 'open'",null);}a.I&&(h.mode=Tk);a.A.o(h,"error",function(){var k=a.u.get(b)[0],l=a.g.error?a.g.error.code:0;console.error("[Flutter ClearKey] SourceBuffer error details:",JSON.stringify({contentType:b,errorCode:l,errorMessage:a.g.error?a.g.error.message:"Unknown",zo:a.g.error,vo:a.l.get(b).updating,uri:k.uri}));k.p.reject(new U(2,3,3014,l,k.uri))});a.A.o(h,"updateend",function(){return Uk(a,b)});a.l.set(b,h);a.F.set(b,e);a.La.set(b,!!c.drmInfos.length)}}
p.configure=function(a){this.C=a;this.h&&(this.h.C=a.modifyCueCallback)};function Vk(a){return a.sa&&!a.M&&!a.G}
function Sk(a,b,c,d){a.h||(a.h=new sf(a.Z),a.h&&(a.h.C=a.C.modifyCueCallback));var e=a.h;d=d||a.Fa;a=a.V;b=="application/cea-608"||b=="application/cea-708"?e.i=null:(e.i=uf.get(b)(),e.i.setSequenceMode?e.i.setSequenceMode(c):bd("Text parsers w/ setSequenceMode",'Text parsers should have a "setSequenceMode" method!'),e.i.setManifestType?e.i.setManifestType(a):bd("Text parsers w/ setManifestType",'Text parsers should have a "setManifestType" method!'),e.D=d)}
function Ok(a){return a.G?!1:a.i?a.i.readyState=="ended":!0}function Pk(a){return a.G?!1:a.i?a.i.readyState=="closed":!0}function Wk(a,b){return a.l.size?b==vc?a.h.g:Pj(Xk(a,b)):null}function Yk(a,b){return a.l.size?b==vc?a.h.h:Qj(Xk(a,b)):null}function Zk(a,b,c){if(b==vc)return a=a.h,a.h==null||a.h<c?0:a.h-Math.max(c,a.g);a=Xk(a,b);return Sj(a,c)}
p.Rc=function(){var a={total:this.G?[]:Tj(this.g.buffered),audio:Tj(Xk(this,"audio")),video:Tj(Xk(this,"video")),text:[]};if(this.h){var b=this.h.g,c=this.h.h;b!=null&&c!=null&&a.text.push({start:b,end:c})}return a};function Xk(a,b){if(a.G||a.M)return null;try{return a.l.get(b).buffered}catch(c){return a.l.has(b),null}}
function $k(a,b,c,d,e,f,g){g=g===void 0?!1:g;var h=null,k=[],l=Lb(c);if(hf.includes(f))c=kk(l),c.length&&d&&((g=c.find(function(t){return t.description==="com.apple.streaming.transportStreamTimestamp"}))&&typeof g.data=="number"&&(h=Math.round(g.data)/1E3),a.O.onMetadata([{cueTime:d.startTime,data:l,frames:c,dts:d.startTime,pts:d.startTime}],0,d.endTime));else if(f.includes("/mp4")&&d&&d.ia){l=new yh;var m=e.emsgSchemeIdUris!=null&&e.emsgSchemeIdUris.length>0||a.C.dispatchAllEmsgBoxes;m&&l.X("emsg",
function(t){var v=e.emsgSchemeIdUris;if(t.version===0){var w=t.reader.pd();var z=t.reader.pd();var y=t.reader.$();var A=t.reader.$();var C=t.reader.$();var F=t.reader.$();var D=d.startTime+A/y}else y=t.reader.$(),D=t.reader.Ud()/y+d.timestampOffset,A=D-d.startTime,C=t.reader.$(),F=t.reader.$(),w=t.reader.pd(),z=t.reader.pd();t=t.reader.cc(t.reader.getLength()-t.reader.Wa(),!0);if(v&&v.includes(w)||a.C.dispatchAllEmsgBoxes)if(w=="urn:mpeg:dash:event:2012")a.O.fm();else if(v=D+C/y,a.O.bm({startTime:D,
endTime:v,schemeIdUri:w,value:z,timescale:y,presentationTimeDelta:A,eventDuration:C,id:F,messageData:t}),w=="https://aomedia.org/emsg/ID3"||w=="https://developer.apple.com/streaming/emsg-id3")if(y=kk(t),y.length)a.O.onMetadata([{cueTime:D,data:t,frames:y,dts:D,pts:D}],0,v)});var n=d.ia.timescale;b=n&&!isNaN(n);var q=0,r=!1;b&&l.X("prft",function(t){var v=t.reader,w=t.version;v.$();t=v.$();var z=v.$();t=t*1E3+z/4294967296*1E3;w===0?v=v.$():(w=v.$(),v=v.$(),v=w*4294967296+v);t=mk(t);v=(new Map).set("detail",
{wallClockTime:t,programStartDate:new Date(t-v/n*1E3)});v=new T("prft",v);a.O.onEvent(v)}).box("moof",Dh).box("traf",Dh).X("tfdt",function(t){r||(q=Ui(t.reader,t.version).baseMediaDecodeTime/n,r=!0,m||t.parser.stop())});(m||b)&&l.parse(c,!1,g);r&&d.timestampOffset==0&&(h=q)}else f.includes("/mp4")||f.includes("/webm")||!Hk(l)||(a.W.has(b)||a.W.set(b,new zk),k=a.W.get(b),k.clearData(),k.ig(d.i),k.parse(l),l=k.getStartTime(b),l!=null&&(h=l),k=k.getMetadata());return{timestamp:h,metadata:k}}
function al(a,b,c,d,e,f,g,h,k,l,m){g=g===void 0?!1:g;h=h===void 0?!1:h;k=k===void 0?!1:k;l=l===void 0?!1:l;var n,q,r,t,v,w,z,y,A,C,F,D,B,G,K,I,J,L,N,P,O;return Q(function(M){switch(M.g){case 1:n=xc;if(b!=n.Va){M.B(2);break}if(a.V!="HLS"){M.B(3);break}return E(M,a.Na,4);case 4:q=M.h,a.h.A=q;case 3:return E(M,xf(a.h,c,d?d.startTime:null,d?d.endTime:null,d?d.S()[0]:null),5);case 5:return M.return();case 2:if(l||!a.m){M.B(6);break}return E(M,al(a,n.na,c,d,e,f,g,h,k,!0),7);case 7:return E(M,al(a,n.Ha,
c,d,e,f,g,h,k,!0),8);case 8:return M.return();case 6:if(!a.l.has(b))return M.return();r=a.l.get(b).timestampOffset;t=a.F.get(b);a.j.has(b)&&(t=a.j.get(b).getOriginalMimeType());if(d&&(v=$k(a,b,c,d,e,t,k),w=v.timestamp,z=v.metadata,w!=null&&(a.T==null&&b==n.Ha&&(a.T=w,a.oa=d.startTime,a.R!=null&&(y=0,a.oa==a.ea&&(y=a.T-a.R),a.aa.resolve(y))),a.R==null&&b==n.na&&(a.R=w,a.ea=d.startTime,a.T!=null&&(A=0,a.oa==a.ea&&(A=a.T-a.R),a.aa.resolve(A))),C=w,F=hf,!a.I&&F.includes(a.F.get(b))&&(C=0),D=d.startTime-
C,B=Math.abs(r-D),(B>=.001||g||h)&&(!k||D>0||!r)&&(r=D,a.fb&&(bl(a,b,function(){return cl(a,b)},null),bl(a,b,function(){return dl(a,b,r)},null))),(G=b==n.Ha||!a.l.has(n.Ha))&&a.Na.resolve(r)),z.length))a.O.onMetadata(z,r,d?d.endTime:null);f&&b==n.Ha&&(a.h||Sk(a,"application/cea-608",a.I,!1),a.J||(K=t.split(";",1)[0],a.J=new rd(K)),d?(I=a.J.Wf(c),I.length&&Ef(a.h,I,r)):a.J.init(c,h,m));if(!a.j.has(b)){M.B(9);break}return E(M,a.j.get(b).transmux(c,e,d,a.i.duration,b),10);case 10:J=M.h,ArrayBuffer.isView(J)?
c=J:(L=J,L.init!=null&&(N=L.init,bl(a,b,function(){el(a,b,N,r,e)},d?d.S()[0]:null)),c=L.data);case 9:c=fl(a,e,c,d,b);if(!d||!a.I||b==n.Va){M.B(11);break}if(!g&&!h){M.B(11);break}P=d.startTime;if(a.V!="HLS"||a.m||b!=n.na||!a.l.has(n.Ha)){M.B(13);break}return E(M,a.aa,14);case 14:O=M.h,Math.abs(O)>.15&&(P-=O);case 13:bl(a,b,function(){return cl(a,b)},null),bl(a,b,function(){return dl(a,b,P)},null);case 11:return E(M,bl(a,b,function(){el(a,b,c,r,e)},d?d.S()[0]:null),15);case 15:H(M)}})}
function gl(a,b){var c=Yk(a,"video")||0;Cf(a.h,b,c)}function hl(a){a.h&&Cf(a.h,"",0)}p.remove=function(a,b,c,d){var e=this,f,g;return Q(function(h){return h.g==1?(f=xc,a==f.Ha&&e.J&&(e.J.remove(d),g=e.h.g||0,e.h.remove(g,c,!0)),a==f.Va?E(h,e.h.remove(b,c),0):c>b?E(h,bl(e,a,function(){return il(e,a,b,c)},null),5):h.B(0)):e.m?E(h,bl(e,f.na,function(){return il(e,f.na,b,c)},null),0):h.B(0)})};
function jl(a,b){var c;return Q(function(d){return d.g==1?(c=xc,b==c.Va?a.h?E(d,a.h.remove(0,Infinity),0):d.return():b===c.Ha&&a.J&&a.h?E(d,a.h.remove(0,Infinity,!0),4):d.B(4)):d.g!=6?E(d,bl(a,b,function(){return il(a,b,0,a.i.duration)},null),6):a.m?E(d,bl(a,c.na,function(){return il(a,c.na,0,a.i.duration)},null),0):d.B(0)})}
p.flush=function(a){var b=this,c;return Q(function(d){return d.g==1?(c=xc,a==c.Va?d.return():E(d,bl(b,a,function(){b.g.currentTime-=.001;Uk(b,a)},null),2)):b.m?E(d,bl(b,c.na,function(){var e=c.na;b.g.currentTime-=.001;Uk(b,e)},null),0):d.B(0)})};
function kl(a,b,c,d,e,f,g,h,k){var l,m,n;return Q(function(q){if(q.g==1){l=xc;if(b==l.Va)return f||(a.h.A=c),Bf(a.h,d,e),q.return();m=[];return E(q,ll(a,b,g,h,k),2)}n=q.h;n||(m.push(bl(a,b,function(){return cl(a,b)},null)),a.m&&m.push(bl(a,l.na,function(){return cl(a,l.na)},null)));f||(m.push(bl(a,b,function(){return dl(a,b,c)},null)),a.m&&m.push(bl(a,l.na,function(){return dl(a,l.na,c)},null)));if(d!=0||e!=Infinity)m.push(bl(a,b,function(){return ml(a,b,d,e)},null)),a.m&&m.push(bl(a,l.na,function(){return ml(a,
l.na,d,e)},null));return m.length?E(q,Promise.all(m),0):q.B(0)})}function nl(a,b,c){var d,e;return Q(function(f){if(f.g==1){d=xc;if(b==d.Va)return f.return();b==d.Ha&&(a.Na=new Kg);if(!a.I||(e=Yk(a,b))&&Math.abs(e-c)<.15)return f.return();bl(a,b,function(){return cl(a,b)},null);a.m&&bl(a,d.na,function(){return cl(a,d.na)},null);return E(f,bl(a,b,function(){return dl(a,b,c)},null),2)}return a.m?E(f,bl(a,d.na,function(){return dl(a,d.na,c)},null),0):f.B(0)})}
p.endOfStream=function(a){var b=this;return Q(function(c){return E(c,ol(b,function(){Ok(b)||Pk(b)||(a?b.i.endOfStream(a):b.i.endOfStream())}),0)})};p.Ib=function(a){var b=this;return Q(function(c){return E(c,ol(b,function(){if(b.C.durationReductionEmitsUpdateEnd&&a<b.i.duration)for(var d=u(b.l.keys()),e=d.next();!e.done;e=d.next()){e=e.value;var f={start:function(){},p:new Kg,uri:null};b.u.get(e).unshift(f)}b.i.duration=a;b.ra=a}),0)})};p.getDuration=function(){return this.i.duration};
function pl(a,b,c){Q(function(d){return a.K.g||a.g.error||a.M||a.G||Ok(a)||Pk(a)?d.return():E(d,ol(a,function(){Ok(a)||Pk(a)||a.i.setLiveSeekableRange(b,c)}),0)})}function ql(a){Q(function(b){return a.K.g||a.g.error||a.M||a.G||Ok(a)||Pk(a)?b.return():E(b,ol(a,function(){Ok(a)||Pk(a)||a.i.clearLiveSeekableRange()}),0)})}
function el(a,b,c,d,e){var f,g,h,k,l,m,n,q;Q(function(r){switch(r.g){case 1:f=Sg();k=(h=(g=f.Bb())?f.h:null)&&Object.keys(h).length>0;l=b==="audio"||b==="video";m=g&&k&&l&&e&&e.encrypted;n=Lb(c);console.log("[Flutter ClearKey] append_ called:",{contentType:b,bo:n.length,$n:g,io:k,jo:l,wo:e?e.encrypted:"no stream",uo:m});if(!m){r.B(2);break}sa(r,3);return E(r,rl(a,c,b),5);case 5:c=r.h;ua(r,2);break;case 3:throw q=va(r),console.error("[Flutter ClearKey] Processing failed:",q),q;case 2:a.H&&gd(a.H,c,
d,e),a.l.get(b).appendBuffer(c),H(r)}})}function il(a,b,c,d){if(d<=c)Uk(a,b);else{if(a.H){var e=a.H;b==="video"&&e.g&&e.g.flushBuffer(c,d)}a.l.get(b).remove(c,d)}}
function rl(a,b,c){var d,e,f,g,h,k,l,m;return Q(function(n){switch(n.g){case 1:d=Lb(b);console.log("[Flutter ClearKey] processEncryptedSegment_ entry:",{so:d.length,fo:Array.from(d.slice(0,16))});e=new yh;g=f=!1;h=[];e.box("moof",function(){f=!0;h.push("moof")});e.box("moov",function(){g=!0;h.push("moov")});e.box("ftyp",function(){h.push("ftyp")});e.box("mdat",function(){h.push("mdat")});try{e.parse(d,!0)}catch(q){return console.log("[Flutter ClearKey] Error detecting segment type:",q),n.return(b)}console.log("[Flutter ClearKey] Segment type detection result:",
{mo:g,lo:f,ho:h});if(!g){n.B(2);break}console.log("[Flutter ClearKey] Processing init segment (moov)");a.ib.set(c,b);console.log("[Flutter ClearKey] Cached encrypted init for",c);return E(n,sl(d),3);case 3:return k=n.h,console.log("[Flutter ClearKey] Init segment processed, size:",k.length),n.return(k);case 2:if(!f){n.B(4);break}console.log("[Flutter ClearKey] Processing media segment (moof+mdat)");l=a.ib.get(c);if(!l)throw console.error("[Flutter ClearKey] No cached init for",c),Error("No cached init segment for: "+
c);return E(n,tl(b,l),5);case 5:return m=n.h,n.return(m);case 4:return console.log("[Flutter ClearKey] Unknown segment type, foundBoxes:",h),n.return(b)}})}
function sl(a){var b,c,d,e;return Q(function(f){if(f.g==1)return console.log("[Flutter ClearKey] Cleaning init segment, size:",a.length),b=Sg(),sa(f,2),E(f,b.Aj(a),4);if(f.g!=2)return c=f.h,d=Lb(c),console.log("[Flutter ClearKey] Init segment processed by Bento4:",a.length,"->",d.length),f.return(d);e=va(f);console.error("[Flutter ClearKey] Bento4 processing failed:",e);console.log("[Flutter ClearKey] Falling back to original init segment");return f.return(a)})}
function tl(a,b){var c,d,e,f,g,h,k,l;return Q(function(m){if(m.g==1)return c=Date.now(),d=Sg(),e=Lb(a),f=Lb(b),console.log("[Flutter ClearKey] Decrypting media segment via Bento4"),console.log("  Init size:",f.length),console.log("  Segment size:",e.length),sa(m,2),E(m,d.Bj(f,e),4);if(m.g!=2)return g=m.h,h=Lb(g),k=Date.now()-c,console.log("[Flutter ClearKey] Media segment decrypted by Bento4:",e.length,"->",h.length,"in",k,"ms"),m.return(g);l=va(m);console.error("[Flutter ClearKey] Bento4 media segment processing failed:",
l);throw l;})}function cl(a,b){var c=a.l.get(b),d=c.appendWindowStart,e=c.appendWindowEnd;c.abort();c.appendWindowStart=d;c.appendWindowEnd=e;Uk(a,b)}function dl(a,b,c){c<0&&(c+=.001);a.l.get(b).timestampOffset=c;Uk(a,b)}function ml(a,b,c,d){var e=a.l.get(b);if(e.appendWindowEnd!==d||e.appendWindowStart!==c)e.appendWindowStart=0,e.appendWindowEnd=d,e.appendWindowStart=c;Uk(a,b)}
function Uk(a,b){if(a.G||a.K.g){var c=a.u.get(b);c&&c.length&&((c=c[0])&&c.p&&c.p.resolve(),a.u.set(b,[]))}else if(c=a.u.get(b)[0])c.p.resolve(),ul(a,b)}function bl(a,b,c,d){sh(a.K);c={start:c,p:new Kg,uri:d};a.u.get(b).push(c);a.u.get(b).length==1&&vl(a,b);return c.p}
function ol(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,t;return Q(function(v){switch(v.g){case 1:sh(a.K);c=[];d=Array.from(a.l.keys());e=u(d);f=e.next();for(g={};!f.done;g={ready:void 0},f=e.next())h=f.value,g.ready=new Kg,k={start:function(w){return function(){return w.ready.resolve()}}(g),p:g.ready,uri:null},l=a.u.get(h),l.push(k),c.push(g.ready),l.length==1&&k.start();sa(v,2);return E(v,Promise.all(c),4);case 4:ua(v,3);break;case 2:throw m=va(v),m;case 3:return sa(v,5,6),E(v,b(),6);case 6:ya(v);n=u(d);for(q=
n.next();!q.done;q=n.next())r=q.value,ul(a,r);za(v,0);break;case 5:throw t=va(v),new U(2,3,3015,t,a.g.error||"No error in the media element",null);}})}function ul(a,b){a.u.get(b).shift();vl(a,b)}function vl(a,b){var c=a.u.get(b)[0];if(c)try{c.start()}catch(d){d.name=="QuotaExceededError"?c.p.reject(new U(2,3,3017,b)):Vk(a)?c.p.reject(new U(2,3,3015,d,a.g.error||"No error in the media element",c.uri)):c.p.reject(new U(2,3,3024,b)),ul(a,b)}}function wl(a,b){a.Z=b;a.h&&(a.h.l=b)}
function fl(a,b,c,d,e){if(lf(a.F.get(e))!="mp4")return c;var f=d===null,g=a.La.get(e),h=a.O.Xk(),k=!1;d&&d.ia&&(k=d.ia.encrypted);d=d?d.S()[0]:null;var l=Tb();a.C.correctEc3Enca&&f&&e==="audio"&&(c=Aj(c));a.C.insertFakeEncryptionInInit&&g&&l.Vd(h,e)&&(f?c=Bj(b,c,d):!k&&l.Gj(e)&&(c=Dj(c)));f&&l.Ie()&&(c=Gj(c));return c}
function xl(a,b,c,d){return bl(a,b,function(){if(b!==vc){a.F.get(b);if(md()){a.j.has(b)&&(a.j.get(b).destroy(),a.j.delete(b));d&&a.j.set(b,d);var e=c+a.C.addExtraFeaturesToSourceBuffer(c);a.l.get(b).changeType(e);a.F.set(b,c)}Uk(a,b)}},null)}
function yl(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,t,v,w,z,y,A,C,F;return Q(function(D){if(D.g==1){if(a.G||a.M)return D.return();c=xc;a.G=!0;a.m=!1;d=a.g.currentTime;e=a.g.autoplay;a.g.paused||(a.hb=!0);a.pb&&(a.g.autoplay=!1);ta(D,2);a.A.Sa();f=u(a.j.values());for(g=f.next();!g.done;g=f.next())h=g.value,h.destroy();k=u(a.l.values());for(l=k.next();!l.done;l=k.next()){m=l.value;try{a.i.removeSourceBuffer(m)}catch(B){}}a.j.clear();a.l.clear();n=a.i.duration;a.L=new Kg;a.i=Jk(a,a.L);return E(D,a.L,4)}if(D.g!=
2){!isNaN(n)&&n?a.i.duration=n:!isNaN(a.ra)&&a.ra&&(a.i.duration=a.ra);q=new Kg;r=a.i.sourceBuffers;t=b.size;v=0;w=function(){v++;v===t&&(q.resolve(),a.A.Ea(r,"addsourcebuffer",w))};a.A.o(r,"addsourcebuffer",w);z=u(b.keys());for(y=z.next();!y.done;y=z.next())A=y.value,C=b.get(A),Rk(a,A,C,C.codecs);(F=b.get(c.na))&&F.isAudioMuxedInVideo&&(a.m=!0);a.m&&!a.u.has(c.na)&&a.u.set(c.na,[]);a.g.currentTime=d;return E(D,q,2)}ya(D);a.G=!1;sh(a.K);a.A.ua(a.g,"canplaythrough",function(){a.K.g||(a.g.autoplay=
e,a.hb&&(a.hb=!1,a.g.play()))});return za(D,0)})}function Hl(a,b){return ol(a,function(){return yl(a,b)})}function Il(a,b,c,d){var e=!1,f=tc("audio",(d||"").split(",")),g=tc("video",(d||"").split(",")),h=g;b=="audio"&&(h=f);h||(h=d);d=gf(c,h);var k=pf(a.F.get(b)),l=a.C.forceTransmux;!jd(d)||!a.I&&hf.includes(d)?l=!0:l||c==k||(l=!Tb().ng()&&hf.includes(c));if(l&&(a=jf(c,h),c=af(a))){var m=c();f&&g&&(e=!0);d=m.convertCodecs(b,a)}b=mf(qf(d));return{tc:m,Im:e,Ii:pf(d),codec:b,mimeType:d}}
function Jl(a,b,c,d,e){if(b==vc)return{type:Kl,Rf:c,tc:null};var f=mf(qf(a.F.get(b))),g=pf(a.F.get(b)),h=Il(a,b,c,d),k=h.tc,l=h.Im,m=h.Ii,n=h.codec;h=h.mimeType;var q=!0;l&&a.F.has("audio")&&(c=Il(a,"audio",c,d),d=mf(qf(a.F.get("audio"))),q=pf(a.F.get("audio")),q=d==c.codec&&q==c.Ii,c.tc&&c.tc.destroy());if(f===n&&g===m&&q)return{type:Kl,Rf:h,tc:k};f=!0;if(a.m&&!e.has("audio")||l&&k&&!a.j.has(b))f=!1;if(f&&a.C.codecSwitchingStrategy==="smooth"&&md())return{type:Ll,Rf:h,tc:k};k&&k.destroy();return{type:Ml,
Rf:h,tc:null}}function ll(a,b,c,d,e){var f,g,h,k,l,m;return Q(function(n){if(n.g==1){f=xc;g=Jl(a,b,c,d,e);h=g.type;k=g.tc;l=g.Rf;if(m=e.get(f.na))a.m=m.isAudioMuxedInVideo;if(h==Kl)return a.j.has(b)&&!k?(a.j.get(b).destroy(),a.j.delete(b)):!a.j.has(b)&&k?a.j.set(b,k):k&&(a.j.has(b)&&a.j.get(b).transmux!==k.transmux?(a.j.get(b).destroy(),a.j.set(b,k)):k.destroy()),n.return(!1);if(h==Ll)return E(n,xl(a,b,l,k),3);if(h!=Ml)return n.B(3);k&&k.destroy();return E(n,Hl(a,e),3)}return n.return(!0)})}
function Nl(a,b,c,d,e){a=Jl(a,b,c,d,e);a.tc&&a.tc.destroy();return a.type==Ml}var Lk=window.URL.createObjectURL,Tk="sequence",Kl="none",Ml="reset",Ll="changeType";function Ol(a,b,c){this.i=a;this.F=b;this.A=this.l=Infinity;this.h=1;this.g=this.j=null;this.C=0;this.D=!0;this.J=!1;this.I=0;this.G=c===void 0?!0:c;this.H=0;this.u=!1;this.m=a}p=Ol.prototype;p.getDuration=function(){return this.l};p.hl=function(){return this.h};p.Tj=function(a){this.i=a};p.Ib=function(a){this.l=a};p.ql=function(){return this.i};p.Qj=function(a){this.C=a};p.td=function(a){a&&!this.D&&(this.J=!0);this.D=a};p.jg=function(a){this.A=a};p.zf=function(){return this.A};
p.ci=function(a){this.F=a};p.Sk=function(){return this.F};p.wj=function(a,b){if(a.length!=0){var c=(Date.now()+this.C)/1E3;a=a.filter(function(e){return e.start+b<c});if(a.length!=0){var d=a[a.length-1].end+b;this.Sf(a[0].start+b);this.h=a.reduce(function(e,f){return Math.max(e,f.end-f.start)},this.h);this.g=Math.max(this.g,d);this.i!=null&&this.G&&!this.u&&(this.i=c-this.g-this.h)}}};
p.De=function(a){if(a.length!=0){var b=a[0].startTime,c=a[0].endTime,d=(Date.now()+this.C)/1E3;a=u(a);for(var e=a.next();!e.done;e=a.next())e=e.value,d<e.startTime||(b=Math.min(b,e.startTime),c=Math.max(c,e.endTime),this.h=Math.max(this.h,e.endTime-e.startTime));this.Sf(b);this.g=Math.max(this.g,c);this.i!=null&&this.G&&!this.u&&(this.i=d-this.g-this.h)}};p.vj=function(a,b){this.Sf(a);b==Infinity||this.U()||(this.g=Math.max(this.g,b))};p.il=function(){return this.g};p.Mf=function(){this.u=!0};
p.Sl=function(){return this.u};p.ei=function(a){this.m=a};p.Wk=function(){return this.m};p.Sf=function(a){this.j==null?this.j=a:this.J||(this.j=Math.min(this.j,a))};p.Lh=function(a){this.h=Math.max(this.h,a)};p.offset=function(a){this.j!=null&&(this.j+=a);this.g!=null&&(this.g+=a)};p.U=function(){return this.l==Infinity&&!this.D};p.md=function(){return this.l!=Infinity&&!this.D};p.Pb=function(){return Math.max(this.I,this.Tc()-this.A)};p.Vj=function(a){this.I=a};
p.Tc=function(){return this.U()||this.md()?Math.min(Math.max(0,(Date.now()+this.C)/1E3-this.h-this.i)+this.H,this.l):this.g?Math.min(this.g,this.l):this.l};p.re=function(a){var b=Math.max(this.j,this.I);return this.A==Infinity?Math.ceil(b*1E3)/1E3:Math.max(b,Math.min(this.Tc()-this.A+a,this.Ob()))};p.jc=function(){return this.re(0)};p.Ob=function(){return Math.max(0,this.Tc()-(this.U()||this.md()?this.F:0))};p.jk=function(){return this.i==null||this.g!=null&&this.G?!1:!0};
p.Pj=function(a){this.H=a};p.Ik=function(){return this.H};S("shaka.media.PresentationTimeline",Ol);Ol.prototype.getAvailabilityTimeOffset=Ol.prototype.Ik;Ol.prototype.setAvailabilityTimeOffset=Ol.prototype.Pj;Ol.prototype.usingPresentationStartTime=Ol.prototype.jk;Ol.prototype.getSeekRangeEnd=Ol.prototype.Ob;Ol.prototype.getSeekRangeStart=Ol.prototype.jc;Ol.prototype.getSafeSeekRangeStart=Ol.prototype.re;Ol.prototype.getSegmentAvailabilityEnd=Ol.prototype.Tc;Ol.prototype.setUserSeekStart=Ol.prototype.Vj;
Ol.prototype.getSegmentAvailabilityStart=Ol.prototype.Pb;Ol.prototype.isInProgress=Ol.prototype.md;Ol.prototype.isLive=Ol.prototype.U;Ol.prototype.offset=Ol.prototype.offset;Ol.prototype.notifyMaxSegmentDuration=Ol.prototype.Lh;Ol.prototype.notifyMinSegmentStartTime=Ol.prototype.Sf;Ol.prototype.getInitialProgramDateTime=Ol.prototype.Wk;Ol.prototype.setInitialProgramDateTime=Ol.prototype.ei;Ol.prototype.isStartTimeLocked=Ol.prototype.Sl;Ol.prototype.lockStartTime=Ol.prototype.Mf;
Ol.prototype.getMaxSegmentEndTime=Ol.prototype.il;Ol.prototype.notifyPeriodDuration=Ol.prototype.vj;Ol.prototype.notifySegments=Ol.prototype.De;Ol.prototype.notifyTimeRange=Ol.prototype.wj;Ol.prototype.getDelay=Ol.prototype.Sk;Ol.prototype.setDelay=Ol.prototype.ci;Ol.prototype.getSegmentAvailabilityDuration=Ol.prototype.zf;Ol.prototype.setSegmentAvailabilityDuration=Ol.prototype.jg;Ol.prototype.setStatic=Ol.prototype.td;Ol.prototype.setClockOffset=Ol.prototype.Qj;
Ol.prototype.getPresentationStartTime=Ol.prototype.ql;Ol.prototype.setDuration=Ol.prototype.Ib;Ol.prototype.setPresentationStartTime=Ol.prototype.Tj;Ol.prototype.getMaxSegmentDuration=Ol.prototype.hl;Ol.prototype.getDuration=Ol.prototype.getDuration;function Pl(a,b,c,d){var e=this;this.A=d;this.g=a;this.F=b;this.h=c;this.j=new Wc;this.m=!1;this.l=0;this.D=!1;this.H=this.G=0;this.u=Ql(this);this.C=!1;this.j.o(a,"waiting",function(){return Rl(e)});this.i=(new Gf(function(){Rl(e)})).xa(this.h.gapJumpTimerTime)}Pl.prototype.release=function(){this.j&&(this.j.release(),this.j=null);this.i!=null&&(this.i.stop(),this.i=null);this.u&&(this.u.release(),this.u=null);this.g=this.F=this.A=null};
Pl.prototype.Vf=function(){this.C=!0;this.i&&this.i.xa(this.h.gapJumpTimerTime);Rl(this)};
function Rl(a){if(a.g.readyState!=0){if(a.g.seeking){if(!a.m)return}else a.m=!1;if(!a.g.paused||a.g.currentTime==a.l&&(a.g.autoplay||a.g.currentTime!=a.l)){var b;if(!(b=!a.u)){b=a.u;var c=b.h,d=Sl(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.m!=d)b.l=f,b.g=e,b.m=d,b.i=!1;e=f-b.l;if(d=e>=b.u&&d&&!b.i)b.j&&b.j(b.g,e),b.i=!0,b.g=c.g.currentTime;b=!d}b&&(b=a.g.currentTime,c=a.g.buffered,d=Uj(c,b,a.h.gapDetectionThreshold),d==null||d==0&&!a.C||(e=c.start(d),(f=a.h.gapPadding)&&(e=Math.ceil((e+f)*
100)/100),e>=a.F.Ob()||e-b<.001||(d!=0&&c.end(d-1),Tl(a,e),b==a.l&&(a.l=e),a.G++,a.A(new T("gapjumped")))))}}}function Tl(a,b){a.D=!0;a.j.ua(a.g,"seeked",function(){a.D=!1});a.g.currentTime=b}
function Ql(a){if(!a.h.stallEnabled)return null;var b=a.h.stallThreshold,c=a.h.stallSkip;return new Ul(new Vl(a.g),b,function(){var d;return Q(function(e){if(e.g==1)return d=Tj(a.g.buffered),d.length?c?(a.g.currentTime+=c,e.B(2)):E(e,a.g.play(),3):e.return();if(e.g!=2){if(!a.g)return e.return();a.g.pause();a.g.play()}a.H++;a.A(new T("stalldetected"));H(e)})})}function Ul(a,b,c){this.h=a;this.m=Sl(a);this.g=a.g.currentTime;this.l=Date.now()/1E3;this.i=!1;this.u=b;this.j=c}
Ul.prototype.release=function(){this.h&&this.h.release();this.j=this.h=null};function Vl(a){var b=this;this.g=a;this.h=new Wc;this.i=!1;this.h.o(this.g,"audiofocuspaused",function(){b.i=!0});this.h.o(this.g,"audiofocusgranted",function(){b.i=!1});this.h.o(this.g,"audiofocuslost",function(){b.i=!0})}
function Sl(a){if(a.g.paused||a.g.playbackRate==0||a.i||a.g.buffered.length==0)var b=!1;else a:{b=a.g.currentTime;a=u(Tj(a.g.buffered));for(var c=a.next();!c.done;c=a.next())if(c=c.value,!(b<c.start-.1||b>c.end-.5)){b=!0;break a}b=!1}return b}Vl.prototype.release=function(){this.h&&this.h.release();this.h=null};function Wl(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=Xl.value().get(b),c.ua(a,b,d))}var Xl=new Sb(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function Yl(a,b,c,d){var e=this;this.g=a;this.m=b;this.A=c;this.l=null;this.j=function(){e.l==null&&(e.l=d());return e.l};this.u=!1;this.h=new Wc;this.i=new Zl(a);Wl(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){$l(e,e.j())})}Yl.prototype.release=function(){this.h&&(this.h.release(),this.h=null);this.i!=null&&(this.i.release(),this.i=null);this.m=function(){};this.g=null};function am(a){return a.u?a.g.currentTime:a.j()}
function bm(a,b){a.g.readyState>0?cm(a.i,b):Wl(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){$l(a,a.j())})}function $l(a,b){Math.abs(a.g.currentTime-b)<.001?dm(a):(a.h.ua(a.g,"seeking",function(){dm(a)}),cm(a.i,a.g.currentTime&&a.g.currentTime!=0?a.g.currentTime:b))}function dm(a){a.u=!0;a.h.o(a.g,"seeking",function(){return a.m()});a.A(a.g.currentTime)}
function Zl(a){var b=this;this.g=a;this.m=10;this.j=this.l=this.i=0;this.h=new Gf(function(){b.i<=0?b.h.stop():b.g.currentTime!=b.l||b.g.currentTime===b.j?b.h.stop():(b.g.currentTime=b.j,b.i--)})}Zl.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};function cm(a,b){a.l=a.g.currentTime;a.j=b;a.i=a.m;a.g.currentTime=b;a.h.xa(.1)};function em(a){this.g=a;this.i=!1;this.h=null;this.j=new Wc}p=em.prototype;p.ready=function(){function a(){if(b.h==null||b.h==0&&b.g.duration!=Infinity)b.i=!0;else{var c=b.g.currentTime,d=null;if(typeof b.h==="number")d=b.h;else if(b.h instanceof Date){var e=fm(b);e!==null&&(d=b.h.getTime()/1E3-e,d=gm(b,d))}d==null?b.i=!0:(d<0&&(d=Math.max(0,c+d)),c!=d?(b.j.ua(b.g,"seeking",function(){b.i=!0}),b.g.currentTime=d):b.i=!0)}}var b=this;Wl(this.g,HTMLMediaElement.HAVE_FUTURE_DATA,this.j,function(){a()})};
p.release=function(){this.j&&(this.j.release(),this.j=null);this.g=null};p.Cg=function(a){this.h=this.i?this.h:a};p.bf=function(){var a=this.i?this.g.currentTime:this.h;a instanceof Date&&(a=a.getTime()/1E3-(fm(this)||0),a=gm(this,a));return a||0};p.Ci=function(){return 0};p.Ai=function(){return 0};p.Bi=function(){return!1};p.uj=function(){};p.ij=function(){var a=Qj(this.g.buffered);return a!=null&&a>=this.g.duration-1};
function fm(a){return a.g.getStartDate&&(a=a.g.getStartDate().getTime(),!isNaN(a))?a/1E3:null}function gm(a,b){a=a.g.seekable;a.length>0&&(b=Math.max(a.start(0),b),b=Math.min(a.end(a.length-1),b));return b}
function hm(a,b,c,d,e,f){var g=this;this.h=a;this.g=b.presentationTimeline;this.l=c;this.A=e;this.u=null;this.i=new Pl(a,b.presentationTimeline,c,f);this.j=new Yl(a,function(){a:{var h=g.i;h.m=!0;h.C=!1;h.i&&h.i.xa(h.h.gapJumpTimerTime);Rl(h);var k=am(g.j);h=im(g,k);if(!nd()&&Math.abs(h-k)>.001){k=!1;var l=Tb().Lj();if(l){var m=Date.now()/1E3;if(!g.u||g.u<m-l)g.u=m,k=!0}else k=!0;if(k){bm(g.j,h);h=void 0;break a}}g.A();h=void 0}return h},function(h){var k=g.i;k.g.seeking&&!k.m&&(k.m=!0,k.l=h);k.i&&
k.i.xa(k.h.gapJumpTimerTime);Rl(k)},function(){return jm(g,d)});this.m=new Gf(function(){if(g.h.readyState!=0&&!g.h.paused){var h=am(g.j),k=g.g.jc(),l=g.g.Ob();l-k<3&&(k=l-3);h<k&&(h=im(g,h),g.h.currentTime=h)}})}p=hm.prototype;p.ready=function(){this.m.xa(.25)};p.release=function(){this.j&&(this.j.release(),this.j=null);this.i&&(this.i.release(),this.i=null);this.m&&(this.m.stop(),this.m=null);this.h=this.j=this.g=this.l=null;this.A=function(){}};p.Cg=function(a){bm(this.j,jm(this,a))};
p.bf=function(){var a=am(this.j);return this.h.readyState>0&&!this.h.paused?km(this,a):a};p.Ci=function(){return this.i.H};p.Ai=function(){return this.i.G};p.Bi=function(){return this.i.D};function jm(a,b){b==null?b=a.g.getDuration()<Infinity?a.g.jc():a.g.Ob():b instanceof Date?b=b.getTime()/1E3-(a.g.m||a.g.i):b<0&&(b=a.g.Ob()+b);return lm(a,km(a,b))}p.uj=function(){this.i.Vf()};p.ij=function(){if(this.g.U()){var a=this.g.Tc(),b=Qj(this.h.buffered);if(b!=null&&b>=a)return!0}return!1};
function lm(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}function im(a,b){var c=a.l.rebufferingGoal,d=a.l.safeSeekOffset,e=a.g.jc(),f=a.g.Ob(),g=a.g.getDuration();f-e<3&&(e=f-3);var h=a.g.re(c),k=a.g.re(d);c=a.g.re(c+d);return b>=g?lm(a,b):b>f?f-a.l.safeSeekEndOffset:b<e?a.g.U()&&a.l.returnToEndOfLiveWindowWhenOutside?f-a.l.safeSeekEndOffset:Rj(a.h.buffered,k)?k:c:b>=h||Rj(a.h.buffered,b)?b:c}function km(a,b){var c=a.g.jc();if(b<c)return c;a=a.g.Ob();return b>a?a:b};function mm(a){this.g=a;this.m=null;this.i=0;this.u=!1}p=mm.prototype;p.getNumReferences=function(){return this.g.length};p.getNumEvicted=function(){return this.i};p.release=function(){this.u||(this.g=[],this.m&&this.m.stop(),this.m=null)};p.Zl=function(){this.u=!0};p.Nb=function(a){for(var b=u(this.g),c=b.next();!c.done;c=b.next())a(c.value)};function jg(a){return a.g[0]||null}
p.find=function(a){for(var b=this.g.length-1,c=b;c>=0;--c){var d=this.g[c],e=c<b?this.g[c+1].startTime:d.endTime;if(a>=d.startTime&&a<e)return c+this.i}return this.g.length&&a<this.g[0].startTime?this.i:null};p.get=function(a){if(this.g.length==0)return null;a-=this.i;return a<0||a>=this.g.length?null:this.g[a]};p.offset=function(a){if(!this.u)for(var b=u(this.g),c=b.next();!c.done;c=b.next())c.value.offset(a)};
p.Of=function(a){if(!this.u&&a.length){var b=Math.round(a[0].startTime*1E3)/1E3;this.g=this.g.filter(function(c){return Math.round(c.startTime*1E3)/1E3<b});this.g.push.apply(this.g,x(a))}};p.Be=function(a,b){var c=this;a=a.filter(function(d){return d.endTime>b&&(c.g.length==0||d.endTime>c.g[0].startTime)});this.Of(a);this.cb(b)};p.cb=function(a){if(!this.u){var b=this.g.length;this.g=this.g.filter(function(c){return c.endTime>a});this.i+=b-this.g.length}};
p.Hd=function(a,b,c){c=c===void 0?!1:c;if(!this.u){for(;this.g.length;)if(this.g[this.g.length-1].startTime>=b)this.g.pop();else break;for(;this.g.length;)if(this.g[0].endTime<=a)this.g.shift(),c||this.i++;else break;this.g.length!=0&&(a=this.g[this.g.length-1],b=new Jj(a.startTime,b,a.D,a.startByte,a.endByte,a.ia,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.g,a.tilesLayout,a.C,a.h,a.status,a.aesKey),b.mimeType=a.mimeType,b.codecs=a.codecs,b.i=a.i,this.g[this.g.length-1]=b)}};
p.sg=function(a,b){var c=this;this.u||(this.m&&this.m.stop(),this.m=new Gf(function(){var d=b();d?c.g.push.apply(c.g,x(d)):(c.m.stop(),c.m=null)}),this.m.xa(a))};mm.prototype[Symbol.iterator]=function(){return this.hc(0)};
mm.prototype.hc=function(a,b,c){b=b===void 0?!1:b;c=c===void 0?!1:c;var d=this.find(a);if(d==null)return null;var e=this.get(d);c?d++:d--;var f=-1;if(e&&e.g.length>0)for(var g=e.g.length-1;g>=0;--g){var h=e.g[g];if(a>=h.startTime&&a<h.endTime){if(!b){for(;g&&!h.l;)g--,h=e.g[g];if(!h.l)return ab("No independent partial segment found!"),null}c?d--:d++;f=g-1;break}}return new nm(this,d,f,c)};mm.prototype.qf=function(){return-1};
function om(a,b,c){a=new Jj(a,a+b,function(){return c},0,null,null,a,a,a+b);return new mm([a])}S("shaka.media.SegmentIndex",mm);mm.forSingleSegment=om;mm.prototype.getIteratorForTime=mm.prototype.hc;mm.prototype.updateEvery=mm.prototype.sg;mm.prototype.fit=mm.prototype.Hd;mm.prototype.evict=mm.prototype.cb;mm.prototype.mergeAndEvict=mm.prototype.Be;mm.prototype.offset=mm.prototype.offset;mm.prototype.get=mm.prototype.get;mm.prototype.find=mm.prototype.find;mm.prototype.markImmutable=mm.prototype.Zl;
mm.prototype.release=mm.prototype.release;mm.prototype.getNumEvicted=mm.prototype.getNumEvicted;mm.prototype.getNumReferences=mm.prototype.getNumReferences;function nm(a,b,c,d){this.i=a;this.h=b;this.g=c;this.reverse=d}p=nm.prototype;p.Zd=function(a){this.reverse=a};p.Dk=function(){return this.h};p.current=function(){var a=this.i.get(this.h);a&&a.g.length>0&&a.m&&this.g>=a.g.length&&(this.h++,this.g=0,a=this.i.get(this.h));return a&&a.g.length>0?a.g[this.g]:a};
p.next=function(){var a=this.i.get(this.h);this.reverse?a&&a.g.length>0?(this.g--,this.g<0&&(this.h--,this.g=(a=this.i.get(this.h))&&a.g.length>0?a.g.length-1:0)):(this.h--,this.g=0):a&&a.g.length>0?(this.g++,a.m&&this.g==a.g.length&&(this.h++,this.g=0)):(this.h++,this.g=0);a=this.current();return{value:a,done:!a}};p.Wh=function(){var a=this.current();if(a&&a.od&&!a.l&&(a=this.i.get(this.h))&&a.g.length>0)for(var b=a.g[this.g];b.l&&!(this.g<=0);)this.g--,b=a.g[this.g]};
S("shaka.media.SegmentIterator",nm);nm.prototype.resetToLastIndependent=nm.prototype.Wh;nm.prototype.next=nm.prototype.next;nm.prototype.current=nm.prototype.current;nm.prototype.currentPosition=nm.prototype.Dk;nm.prototype.setReverse=nm.prototype.Zd;function pm(){mm.call(this,[]);this.h=[]}ma(pm,mm);p=pm.prototype;p.clone=function(){var a=new pm;a.h=this.h.slice();a.i=this.i;return a};p.release=function(){this.h=[]};p.Nb=function(a){for(var b=u(this.h),c=b.next();!c.done;c=b.next())c.value.Nb(a)};
function qm(a,b){a=u(a.h);for(var c=a.next();!c.done;c=a.next())b(c.value)}p.find=function(a){for(var b=this.i,c=u(this.h),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.find(a);if(e!=null)return e+b;b+=d.getNumEvicted()+d.getNumReferences()}return null};function rm(a,b){a=u(a.h);for(var c=a.next();!c.done;c=a.next())if(c=c.value,c.find(b)!=null)return c.qf();return-1}
p.get=function(a){for(var b=this.i,c=u(this.h),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;e=d.getNumReferences();b+=d.getNumEvicted()+e}return null};p.offset=function(){};p.Of=function(){};p.cb=function(a){if(this.h.length){var b=this.h[0];b.cb(a);b.getNumReferences()==0&&(this.h.shift(),this.i+=b.getNumEvicted(),b.release(),this.cb(a))}};p.Be=function(){};p.Hd=function(){};p.sg=function(){};S("shaka.media.MetaSegmentIndex",pm);pm.prototype.updateEvery=pm.prototype.sg;
pm.prototype.fit=pm.prototype.Hd;pm.prototype.mergeAndEvict=pm.prototype.Be;pm.prototype.evict=pm.prototype.cb;pm.prototype.merge=pm.prototype.Of;pm.prototype.offset=pm.prototype.offset;pm.prototype.get=pm.prototype.get;pm.prototype.find=pm.prototype.find;pm.prototype.forEachTopLevelReference=pm.prototype.Nb;pm.prototype.release=pm.prototype.release;function sm(a){var b=this;this.g=a;this.j=!1;this.i=this.g.yf();this.h=new Gf(function(){b.g.sj(b.i*.25)})}sm.prototype.release=function(){this.set(this.ld());this.h&&(this.h.stop(),this.h=null);this.g=null};sm.prototype.set=function(a){this.i=a;tm(this)};sm.prototype.ld=function(){return this.g.ld()};function tm(a){a.h.stop();var b=a.j?0:a.i;if(b>=0)try{a.g.yf()!=b&&a.g.gi(b);return}catch(c){}a.h.xa(.25);a.g.yf()!=0&&a.g.gi(0)};function um(a){var b=this;this.j=a;this.h=new Wc;this.g=new Set;this.i=(new Gf(function(){vm(b,!1)})).Ka();a.paused||this.i.xa(.25);this.h.o(a,"playing",function(){b.i.Ka().xa(.25)});this.h.o(a,"pause",function(){b.i.stop()})}um.prototype.release=function(){this.h&&(this.h.release(),this.h=null);this.i.stop();for(var a=u(this.g),b=a.next();!b.done;b=a.next())b.value.release();this.g.clear()};function vm(a,b){var c=a.j.currentTime;a=u(a.g);for(var d=a.next();!d.done;d=a.next())d.value.j(c,b)};function wm(a){mb.call(this);this.g=new Map;this.h=a}ma(wm,mb);wm.prototype.release=function(){this.g.clear();mb.prototype.release.call(this)};function xm(a,b){var c=a.g.get(b);c||(c={He:[],Ug:null,contentType:b},a.g.set(b,c));return c}function ym(a,b,c){var d=xm(a,b.contentType);zm(a,d);a={Pd:b,position:c};d=d.He;b=d.findIndex(function(e){return e.position>=c});b>=0?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
wm.prototype.j=function(a){for(var b=u(this.g.values()),c=b.next();!c.done;c=b.next()){c=c.value;var d=c.Ug;a:{var e=c.He;for(var f=e.length-1;f>=0;f--){var g=e[f];if(g.position<=a){e=g.Pd;break a}}e=null}f=e&&!(d===e||d&&e&&d.bandwidth==e.bandwidth&&d.audioSamplingRate==e.audioSamplingRate&&d.codecs==e.codecs&&d.contentType==e.contentType&&d.frameRate==e.frameRate&&d.height==e.height&&d.mimeType==e.mimeType&&d.channelsCount==e.channelsCount&&d.pixelAspectRatio==e.pixelAspectRatio&&d.width==e.width);
g=e&&d&&e.label&&d.label&&d.label!==e.label;var h=e&&d&&e.language&&d.language&&d.language!==e.language;d=e&&d&&e.roles&&d.roles&&!Vc(d.roles,e.roles);(g||h||d)&&Am(this,a,e.contentType)&&(c.Ug=e,d=new T("audiotrackchange",new Map([["quality",e],["position",a]])),this.dispatchEvent(d));f&&Am(this,a,e.contentType)&&(c.Ug=e,JSON.stringify(e),c=new T("qualitychange",new Map([["quality",e],["position",a]])),this.dispatchEvent(c))}};
function Am(a,b,c){return(a=a.h()[c])&&a.length>0&&(c=a[a.length-1].end,b>=a[0].start&&b<c)?!0:!1}function zm(a,b){if((a=a.h()[b.contentType])&&a.length>0){var c=a[0].start,d=a[a.length-1].end,e=b.He;b.He=e.filter(function(f,g){return f.position<=c&&g+1<e.length&&e[g+1].position<=c||f.position>=d?!1:!0})}else b.He=[]}
function Bm(a){var b={bandwidth:a.bandwidth||0,audioSamplingRate:null,codecs:a.codecs,contentType:a.type,frameRate:null,height:null,mimeType:a.mimeType,channelsCount:null,pixelAspectRatio:null,width:null,label:null,roles:a.roles,language:null};a.type=="video"&&(b.frameRate=a.frameRate||null,b.height=a.height||null,b.pixelAspectRatio=a.pixelAspectRatio||null,b.width=a.width||null);a.type=="audio"&&(b.audioSamplingRate=a.audioSamplingRate,b.channelsCount=a.channelsCount,b.label=a.label||null,b.language=
a.language);return b};function Cm(a){mb.call(this);this.h=new Map;this.i=a;this.g=null}ma(Cm,mb);Cm.prototype.release=function(){this.h.clear();this.g&&(this.g.stop(),this.g=null);mb.prototype.release.call(this)};function Dm(a,b){var c=b.schemeIdUri+"_"+b.id+"_"+(b.startTime.toFixed(1)+"_"+b.endTime.toFixed(1));a.h.has(c)||(a.h.set(c,b),b=new T("regionadd",new Map([["region",b]])),a.dispatchEvent(b),Em(a))}
function Em(a){a.g||(a.g=(new Gf(function(){for(var b=a.i(),c=u(a.h),d=c.next();!d.done;d=c.next()){var e=u(d.value);d=e.next().value;e=e.next().value;e.endTime<b.start&&(a.h.delete(d),d=new T("regionremove",new Map([["region",e]])),a.dispatchEvent(d))}!a.h.size&&a.g&&(a.g.stop(),a.g=null)})).xa(2))};function Fm(a,b,c,d,e){function f(g,h){return h.fastSwitching&&g.od&&g.ze?!1:!0}this.m=a;this.i=b;this.l=c;this.g=new Map;this.j=new Map;this.h=null;this.u=d;this.A=e||f}function Gm(a,b){a.l=b;a=u(a.g.values());for(var c=a.next();!c.done;c=a.next())c.value.g=b}
function Hm(a,b,c){c=c===void 0?!1:c;if(!a.i.segmentIndex)return Promise.resolve();a.h||(a.h=a.i.segmentIndex.hc(b,!0,a.u));if(!a.h)return Promise.resolve();c&&a.h.next();for(b=[];a.g.size<a.m;){c=a.h.next().value;if(!c)break;var d=!0;c.isPreload()&&c.endByte!=null&&(d=!1);c.Vc()==2&&(d=!1);c.kc(!1)&&(d=!1);d&&c.ia&&b.push(Im(a,c.ia));d&&!a.g.has(c)&&(d=new Jm(a.l),b.push(Km(d,c,a.i)),a.g.set(c,d));if(!a.A(c,a.i))break}Lm(a);return Promise.all(b)}
function Im(a,b){if(!a.i.segmentIndex||b.kc()||Array.from(a.j.keys()).some(function(e){return Ij(e,b)}))return Promise.resolve();var c=new Jm(a.l),d=Km(c,b,a.i);a.j.set(b,c);return d}function Mm(a,b){b=u(b.keys());for(var c=b.next();!c.done;c=b.next())(c=c.value)&&Nm(a,c)}function Om(a){Mm(a,a.g);Mm(a,a.j);a.h=null}Fm.prototype.cb=function(a,b){b=b===void 0?!1:b;for(var c=u(this.g.keys()),d=c.next();!d.done;d=c.next())d=d.value,a>d.endTime&&Nm(this,d);b&&Lm(this)};
Fm.prototype.Zd=function(a){this.u=a;this.h&&this.h.Zd(a)};function Lm(a){if(a.g.size)for(var b=Array.from(a.g.keys()),c=u(a.j.keys()),d=c.next(),e={};!d.done;e={Fh:void 0},d=c.next())e.Fh=d.value,b.some(function(f){return function(g){return Ij(g.ia,f.Fh)}}(e))||Nm(a,e.Fh)}function Pm(a,b){a.m=b;for(var c=Array.from(a.g.keys());c.length>b;){var d=c.pop();d&&Nm(a,d)}Lm(a)}function Qm(a,b){b&&b!==a.i&&(Om(a),a.i=b)}
function Nm(a,b){var c=a.g;b instanceof Hj&&(c=a.j);a=c.get(b);c.delete(b);a&&a.abort()}function Jm(a){this.g=a;this.Ee=this.ni=null}function Km(a,b,c){var d=new Uint8Array(0);a.Ee=a.g(b,c,function(e){return Q(function(f){if(f.g==1)return d.byteLength>0?d=oc(d,e):d=e,a.ni?E(f,a.ni(d),3):f.B(0);d=new Uint8Array(0);H(f)})});return a.Ee.promise.catch(function(e){return e instanceof U&&e.code==7001?Promise.resolve():Promise.reject(e)})}Jm.prototype.abort=function(){this.Ee&&this.Ee.abort()};S("shaka.config.CrossBoundaryStrategy",{KEEP:"keep",RESET:"reset",RESET_TO_ENCRYPTED:"reset_to_encrypted",RESET_ON_ENCRYPTION_CHANGE:"RESET_ON_ENCRYPTION_CHANGE"});function Rm(a){var b=pf(a),c=b.split("/")[0];a=qf(a);return{type:c,mimeType:b,codecs:a,language:null,height:null,width:null,channelCount:null,sampleRate:null,closedCaptions:new Map,Pe:null,colorGamut:null,frameRate:null}}
function Sm(a,b,c){function d(B){z=B.name;var G=B.reader;G.skip(24);var K=G.Ia(),I=G.Ia();G.skip(50);q=String(K);n=String(I);B.reader.Pa()&&Dh(B)}function e(B){var G=Xi(B.reader);r=G.channelCount;t=G.sampleRate;f(B.name)}function f(B){B=B.toLowerCase();switch(B){case "avc1":case "avc3":h.push(B+".42E01E");l=!0;break;case "hev1":case "hvc1":h.push(B+".1.6.L93.90");l=!0;break;case "dvh1":case "dvhe":h.push(B+".05.04");l=!0;break;case "vp09":h.push(B+".00.10.08");l=!0;break;case "av01":h.push(B+".0.01M.08");
l=!0;break;case "mp4a":g.push("mp4a.40.2");k=!0;break;case "ac-3":case "ec-3":case "ac-4":case "opus":case "flac":g.push(B);k=!0;break;case "apac":g.push("apac.31.00"),k=!0}}var g=[],h=[],k=!1,l=!1,m=null,n=null,q=null,r=null,t=null,v=null,w=null,z;(new yh).box("moov",Dh).box("trak",Dh).box("mdia",Dh).X("mdhd",function(B){m=Vi(B.reader,B.version).language}).box("minf",Dh).box("stbl",Dh).X("stsd",Fh).box("mp4a",function(B){var G=Xi(B.reader);r=G.channelCount;t=G.sampleRate;B.reader.Pa()?Dh(B):f(B.name)}).box("esds",
function(B){B=B.reader;for(var G="mp4a",K,I;B.Pa();){K=B.ba();for(var J=B.ba();J&128;)J=B.ba();if(K==3)B.Ia(),J=B.ba(),J&128&&B.Ia(),J&64&&B.skip(B.ba()),J&32&&B.Ia();else if(K==4)I=B.ba(),B.skip(12);else if(K==5)break}I&&(G+="."+$i(I),K==5&&B.Pa()&&(K=B.ba(),I=(K&248)>>3,I===31&&B.Pa()&&(I=32+((K&7)<<3)+((B.ba()&224)>>5)),G+="."+I));g.push(G);k=!0}).box("ac-3",e).box("ec-3",e).box("ac-4",e).box("Opus",e).box("fLaC",e).box("apac",e).box("avc1",d).box("avc3",d).box("hev1",d).box("hvc1",d).box("dva1",
d).box("dvav",d).box("dvh1",d).box("dvhe",d).box("vp09",d).box("av01",d).box("avcC",function(B){var G=z||"";switch(z){case "dvav":G="avc3";break;case "dva1":G="avc1"}B=B.reader;B.skip(1);B=G+"."+$i(B.ba())+$i(B.ba())+$i(B.ba());h.push(B);l=!0}).box("hvcC",function(B){var G=z||"";switch(z){case "dvh1":G="hvc1";break;case "dvhe":G="hev1"}var K=B.reader;K.skip(1);B=K.ba();var I=["","A","B","C"][B>>6],J=B&31,L=K.$(),N=(B&32)>>5?"H":"L";B=[K.ba(),K.ba(),K.ba(),K.ba(),K.ba(),K.ba()];K=K.ba();for(var P=
0,O=0;O<32;O++){P|=L&1;if(O==31)break;P<<=1;L>>=1}G=G+("."+I+J)+("."+$i(P,!0));G+="."+N+K;I="";for(J=B.length;J--;)if((N=B[J])||I)I="."+N.toString(16).toUpperCase()+I;G+=I;h.push(G);l=!0}).box("dvcC",function(B){var G=z||"";switch(z){case "hvc1":G="dvh1";break;case "hev1":G="dvhe";break;case "avc1":G="dva1";break;case "avc3":G="dvav";break;case "av01":G="dav1"}var K=B.reader;K.skip(2);B=K.ba();K=K.ba();h.push(G+"."+aj(B>>1&127)+"."+aj(B<<5&32|K>>3&31));l=!0}).box("dvvC",function(B){var G=z||"";switch(z){case "hvc1":G=
"dvh1";break;case "hev1":G="dvhe";break;case "avc1":G="dva1";break;case "avc3":G="dvav";break;case "av01":G="dav1"}var K=B.reader;K.skip(2);B=K.ba();K=K.ba();h.push(G+"."+aj(B>>1&127)+"."+aj(B<<5&32|K>>3&31));l=!0}).X("vpcC",function(B){var G=z||"",K=B.reader;B=K.ba();var I=K.ba();K=K.ba()>>4&15;h.push(G+"."+aj(B)+"."+aj(I)+"."+aj(K));l=!0}).box("av1C",function(B){var G=z||"";switch(z){case "dav1":G="av01"}var K=B.reader;K.skip(1);B=K.ba();K=K.ba();var I=B>>>5,J=(K&64)>>6;h.push(G+"."+I+"."+aj(B&
31)+(K>>>7?"H":"M")+"."+aj(I===2&&J?(K&32)>>5?12:10:J?10:8)+"."+((K&16)>>4)+"."+((K&8)>>3)+((K&4)>>2)+(K&3)+"."+aj(1)+"."+aj(1)+"."+aj(1)+".0");l=!0}).box("enca",Hh).box("encv",Gh).box("sinf",Dh).box("frma",function(B){B=Yi(B.reader).codec;f(B)}).box("colr",function(B){h=h.map(function(I){if(I.startsWith("av01.")){var J=B.reader,L=J.Wa(),N=J.cc(4,!1);var P=String.fromCharCode(N[0]);P+=String.fromCharCode(N[1]);P+=String.fromCharCode(N[2]);P+=String.fromCharCode(N[3]);if(P==="nclx"){N=J.Ia();P=J.Ia();
var O=J.Ia(),M=J.ba()>>7,R=I.split(".");R.length==10&&(R[6]=aj(N),R[7]=aj(P),R[8]=aj(O),R[9]=String(M),I=R.join("."))}J.seek(L)}return I});var G=Zi(B.reader),K=G.colorGamut;v=G.Pe;w=K}).parse(a||b,!0,!0);if(!g.length&&!h.length)return null;var y=k&&!l,A=new Map;if(l&&!c){c=new rd("video/mp4");a&&c.init(a);try{c.Wf(b);for(var C=u(c.Bg()),F=C.next();!F.done;F=C.next()){var D=F.value;A.set(D,D)}}catch(B){}c.ge()}return{type:y?"audio":"video",mimeType:y?"audio/mp4":"video/mp4",codecs:Tm(g.concat(h)).join(", "),
language:m,height:n,width:q,channelCount:r,sampleRate:t,closedCaptions:A,Pe:v,colorGamut:w,frameRate:null}}function Tm(a){var b=new Set,c=[];a=u(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e=of(d);b.has(e)||(c.push(d),b.add(e))}b=wc("audio",c);d=wc("video",c);a=wc(vc,c);d=Um(d);b=b.concat(d).concat(a);return c.length&&!b.length?c:b}
function Um(a){if(a.length<=1)return a;var b=a.find(function(c){return c.startsWith("dvav.")||c.startsWith("dva1.")||c.startsWith("dvh1.")||c.startsWith("dvhe.")||c.startsWith("dav1.")||c.startsWith("dvc1.")||c.startsWith("dvi1.")});return b?jd('video/mp4; codecs="'+b+'"')?[b]:a.filter(function(c){return c!=b}):a}
function Vm(a){var b=null;(new yh).box("moov",Dh).box("trak",Dh).box("mdia",Dh).box("minf",Dh).box("stbl",Dh).X("stsd",Fh).box("encv",Gh).box("enca",Hh).box("sinf",Dh).box("schi",Dh).X("tenc",function(c){c=c.reader;c.ba();c.ba();c.ba();c.ba();c=c.cc(16,!1);b=nc(c)}).parse(a,!0);return b}
function Wm(a,b,c){var d,e,f,g,h;return Q(function(k){if(k.g==1)return d=b,d.cryptoKey?k.B(2):E(k,d.fetchKey(),3);e=d.iv;if(!e)for(e=Lb(new ArrayBuffer(16)),f=d.firstMediaSequenceNumber+c,g=e.byteLength-1;g>=0;g--)e[g]=f&255,f>>=8;b.blockCipherMode=="CBC"?h={name:"AES-CBC",iv:e}:h={name:"AES-CTR",counter:e,length:64};return k.return(window.crypto.subtle.decrypt(h,d.cryptoKey,a))})};function Xm(a,b,c,d,e){a=jh(a,d,e);if(b!=0||c!=null)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function Ym(a,b){var c=this;this.g=b;this.j=a;this.i=null;this.L=new Map;this.D=1;this.C=this.u=null;this.T=0;this.h=new Map;this.M=!1;this.V=null;this.F=!1;this.l=new rh(function(){return Zm(c)});this.P=Date.now()/1E3;this.m=new Map;this.R={projection:null,hfov:null};this.Z=0;this.W=Infinity;this.H=null;this.O=[];this.A=new Gf(function(){if(c.j&&c.g)if(c.j.presentationTimeline.U()){var d=c.j.presentationTimeline.jc(),e=c.j.presentationTimeline.Ob();e-d>1?pl(c.g.ha,d,e):ql(c.g.ha)}else ql(c.g.ha),
c.A&&c.A.stop();else c.A&&c.A.stop()});this.I=null;this.J=!1;this.K=new Gf(function(){var d=c.g.video;!d.ended&&c.I&&(c.J=!0,d.currentTime=c.I,c.I=null)});this.G=new Wc}p=Ym.prototype;p.destroy=function(){return this.l.destroy()};
function Zm(a){var b,c,d,e,f,g,h;return Q(function(k){if(k.g==1){a.A&&a.A.stop();a.A=null;a.K&&a.K.stop();a.K=null;a.G&&(a.G.release(),a.G=null);b=[];c=u(a.h.values());for(d=c.next();!d.done;d=c.next())e=d.value,$m(e),b.push(an(e)),e.ma&&(Om(e.ma),e.ma=null);f=u(a.m.values());for(g=f.next();!g.done;g=f.next())h=g.value,Om(h);return E(k,Promise.all(b),2)}a.h.clear();a.m.clear();a.g=null;a.j=null;a.i=null;a.I=null;H(k)})}
p.configure=function(a){this.i=a;this.V=new Tg({maxAttempts:Math.max(a.retryParameters.maxAttempts,2),baseDelay:a.retryParameters.baseDelay,backoffFactor:a.retryParameters.backoffFactor,fuzzFactor:a.retryParameters.fuzzFactor,timeout:0,stallTimeout:0,connectionTimeout:0},!0);if(a.disableAudioPrefetch){var b=this.h.get("audio");b&&b.ma&&(Om(b.ma),b.ma=null);b=u(this.m.keys());for(var c=b.next();!c.done;c=b.next())c=c.value,Om(this.m.get(c)),this.m.delete(c)}a.disableTextPrefetch&&(b=this.h.get(vc))&&
b.ma&&(Om(b.ma),b.ma=null);a.disableVideoPrefetch&&(b=this.h.get("video"))&&b.ma&&(Om(b.ma),b.ma=null);b=u(this.h.keys());for(c=b.next();!c.done;c=b.next())c=this.h.get(c.value),c.ma?(Pm(c.ma,a.segmentPrefetchLimit),a.segmentPrefetchLimit>0||(Om(c.ma),c.ma=null)):a.segmentPrefetchLimit>0&&(c.ma=bn(this,c.stream));a.disableAudioPrefetch||cn(this)};function dn(a,b,c){a.j.presentationTimeline.U()||(a.Z=b,a.W=c)}
p.start=function(a){var b=this;return Q(function(c){if(c.g==1)return E(c,en(b,a||new Map),2);sh(b.l);b.M=!0;H(c)})};function fn(a,b){var c,d,e,f,g,h,k;Q(function(l){switch(l.g){case 1:return c=xc,a.T++,d=a.T,sa(l,2),E(l,jl(a.g.ha,c.Va),4);case 4:ua(l,3);break;case 2:if(e=va(l),a.g)a.g.onError(e);case 3:f=gf(b.mimeType,b.codecs),Sk(a.g.ha,f,a.j.sequenceMode,b.external),g=a.g.ha.Z,(h=g.isTextVisible()||a.i.alwaysStreamText)&&a.T==d&&(k=gn(a,b),a.h.set(c.Va,k),hn(a,k,0)),H(l)}})}
function jn(a){var b=a.h.get(vc);b&&($m(b),an(b).catch(function(){}),a.H=a.h.get(vc),a.h.delete(vc),b.stream&&b.stream.closeSegmentIndex&&b.stream.closeSegmentIndex());a.C=null}
function kn(a,b){for(var c=a.g.Za()<0,d=u(a.h.values()),e=d.next();!e.done;e=d.next())e=e.value,e.Ba&&e.Ba.Zd(c),e.ma&&e.ma.Zd(c);d=u(a.m.values());for(e=d.next();!e.done;e=d.next())e.value.Zd(c);if(c=a.h.get("video"))if(d=c.stream)if(b)(b=d.trickModeVideo)&&!c.$c&&(ln(a,b,!1,0,!1),c.$c=d);else if(b=c.$c)c.$c=null,ln(a,b,!0,0,!1)}
function mn(a,b,c,d,e,f){c=c===void 0?!1:c;d=d===void 0?0:d;e=e===void 0?!1:e;f=f===void 0?!1:f;a.u=b;a.M&&(b.video&&ln(a,b.video,c,d,e,f),b.audio&&ln(a,b.audio,c,d,e,f))}function nn(a,b){Q(function(c){if(c.g==1)return a.H=null,a.C=b,a.M?b.segmentIndex?c.B(2):E(c,b.createSegmentIndex(),2):c.return();ln(a,b,!0,0,!1);H(c)})}function on(a){var b=a.h.get(vc);b&&ln(a,b.stream,!0,0,!0)}
function pn(a,b){for(var c=u(a.L.entries()),d=c.next();!d.done;d=c.next()){var e=u(d.value);d=e.next().value;e=e.next().value;d.includes(b.type)&&(e(),a.L.delete(d))}}
function ln(a,b,c,d,e,f){var g=a.h.get(b.type);g||b.type!=vc?g&&(g.$c&&(b.trickModeVideo?(g.$c=b,b=b.trickModeVideo):g.$c=null),g.stream!=b||e)&&(a.m.has(b)?g.ma=a.m.get(b):g.ma&&Qm(g.ma,b),b.type==vc&&g.stream!=b&&(e=gf(b.mimeType,b.codecs),Sk(a.g.ha,e,a.j.sequenceMode,b.external)),!a.m.has(g.stream)&&g.stream.closeSegmentIndex&&(g.Ra?(e="("+g.type+":"+g.stream.id+")",a.L.has(e)||a.L.set(e,g.stream.closeSegmentIndex)):g.stream.closeSegmentIndex()),e=g.stream.isAudioMuxedInVideo!=b.isAudioMuxedInVideo,
g.stream=b,g.Ba=null,g.Ig=!!f,b.dependencyStream?g.Qc=gn(a,b.dependencyStream):g.Qc=null,qn(a),e&&(g.zb=null,g.Dc=null,g.Cc=null,b.isAudioMuxedInVideo&&(b=null,g.type==="video"?b=a.h.get("audio"):g.type==="audio"&&(b=a.h.get("video")),b&&(an(b).catch(function(){}),b.zb=null,b.Dc=null,b.Cc=null,rn(a,b),sn(a,b).catch(function(h){if(a.g)a.g.onError(h)})))),c?g.fc?g.ce=!0:g.Ra?(g.wc=!0,g.Dd=d,g.ce=!0):($m(g),tn(a,g,!0,d).catch(function(h){if(a.g)a.g.onError(h)})):g.Ra||g.Ab||hn(a,g,0),sn(a,g).catch(function(h){if(a.g)a.g.onError(h)})):
fn(a,b)}
function sn(a,b){var c,d,e;return Q(function(f){if(f.g==1){if(!b.$a)return f.return();c=b.stream;d=b.$a;return c.segmentIndex?f.B(2):E(f,c.createSegmentIndex(),2)}if(f.g!=4)return e=c.dependencyStream,!e||e.segmentIndex?f.B(4):E(f,e.createSegmentIndex(),4);if(b.$a!=d||b.stream!=c)return f.return();var g=a.g.Ac();var h=Yk(a.g.ha,b.type),k=b.stream.segmentIndex.find(b.Ua?b.Ua.endTime:g),l=k==null?null:b.stream.segmentIndex.get(k);k=l?Lj(l):null;l&&!k&&(k=(l.endTime-l.getStartTime())*(b.stream.bandwidth||a.u.bandwidth)/
8);k?((l=l.ia)&&(k+=(l.endByte?l.endByte+1-l.startByte:null)||0),l=a.g.getBandwidthEstimate(),g=k*8/l<(h||0)-g-a.i.rebufferingGoal||b.$a.h.g>k?!0:!1):g=!0;g&&b.$a.abort();H(f)})}
p.sd=function(){if(this.g){for(var a=this.g.Ac(),b=u(this.h.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.h.get(d);var e;if(e=!this.J)e=this.g.ha,d==vc?(e=e.h,e=e.g==null||e.h==null?!1:a>=e.g&&a<e.h):(e=Xk(e,d),e=Rj(e,a)),e=!e;if(e){this.P=0;c.ma&&(c.ma.h=null);if(c.type==="audio"){e=u(this.m.values());for(var f=e.next();!f.done;f=e.next())f.value.h=null}c.Ba=null;(Yk(this.g.ha,d)!=null||c.Ra)&&rn(this,c);c.$a&&(c.$a.abort(),c.$a=null);d===vc&&(d=this.g.ha,d.J&&d.J.ge());c.sd=!0}!this.J||
c.fc||c.Ra||c.Ab||hn(this,c,0)}un(this)&&vn(this)}};function rn(a,b){b.fc||b.wc||(b.Ra?(b.wc=!0,b.Dd=0):Wk(a.g.ha,b.type)==null?b.Ab==null&&hn(a,b,0):($m(b),tn(a,b,!1,0).catch(function(c){if(a.g)a.g.onError(c)})))}
function en(a,b){var c,d,e,f,g,h,k,l;return Q(function(m){if(m.g==1){if(!a.u)throw new U(2,5,5006);c=wn(a,!0);d=a.g.ha;return E(m,d.init(c,a.j.sequenceMode,a.j.type,a.j.ignoreManifestTimestampsInSegmentsMode),2)}sh(a.l);a.updateDuration();e=u(c.keys());for(f=e.next();!f.done;f=e.next())g=f.value,h=c.get(g),a.h.has(g)||(k=gn(a,h),b.has(h.id)&&(l=b.get(h.id),Gm(l,function(n,q,r){return xn(n,q,r||null,a.i.retryParameters,a.g.Fc)}),k.ma=l),a.h.set(g,k),hn(a,k,0));qn(a);H(m)})}
function gn(a,b){var c={stream:b,type:b.type,Ba:null,ma:bn(a,b),Ua:null,zb:null,Lf:null,Dc:null,Cc:null,Jf:null,Kf:null,$c:null,endOfStream:!1,Ra:!1,Ab:null,wc:!1,Dd:0,ce:!1,fc:!1,sd:!0,Ig:!1,Th:!1,ue:!1,$a:null,Qc:null};b.dependencyStream&&(c.Qc=gn(a,b.dependencyStream));return c}
function bn(a,b){if(b.type==="video"&&a.i.disableVideoPrefetch||b.type==="audio"&&a.i.disableAudioPrefetch||b.type===vc&&(b.mimeType=="application/cea-608"||b.mimeType=="application/cea-708")||b.type===vc&&a.i.disableTextPrefetch)return null;if(a.m.has(b))return a.m.get(b);var c=a.h.get(b.type);return(c=c&&c.ma)&&b===c.i?c:a.i.segmentPrefetchLimit>0?new Fm(a.i.segmentPrefetchLimit,b,function(d,e,f){return xn(d,e,f||null,a.i.retryParameters,a.g.Fc)},a.g.Za()<0,a.g.Gm):null}
function cn(a){for(var b=a.i.segmentPrefetchLimit,c=a.i.prefetchAudioLanguages,d=u(a.j.variants),e=d.next(),f={};!e.done;f={Ub:void 0},e=d.next())if(f.Ub=e.value,f.Ub.audio)if(a.m.has(f.Ub.audio)){if(e=a.m.get(f.Ub.audio),Pm(e,b),!(b>0&&c.some(function(h){return function(k){return Ac(h.Ub.audio.language,k)}}(f)))){var g=a.h.get(f.Ub.audio.type);e!==(g&&g.ma)&&Om(e);a.m.delete(f.Ub.audio)}}else b<=0||!c.some(function(h){return function(k){return Ac(h.Ub.audio.language,k)}}(f))||!(e=bn(a,f.Ub.audio))||
(f.Ub.audio.segmentIndex||f.Ub.audio.createSegmentIndex(),a.m.set(f.Ub.audio,e))}p.updateDuration=function(){var a=nd(),b=this.j.presentationTimeline.getDuration();b<Infinity?(a&&(this.A&&this.A.stop(),ql(this.g.ha)),this.g.ha.Ib(b)):a?(this.A&&this.A.xa(.5),this.g.ha.Ib(Infinity)):this.g.ha.Ib(4294967296)};
function yn(a,b){var c,d,e,f,g,h,k,l,m;return Q(function(n){switch(n.g){case 1:sh(a.l);c=xc;if(b.Ra||b.Ab==null||b.fc)return n.return();b.Ab=null;if(!b.wc){n.B(2);break}return E(n,tn(a,b,b.ce,b.Dd),3);case 3:return n.return();case 2:pn(a,b);if(b.stream.segmentIndex){n.B(4);break}d=b.stream;sa(n,5);return E(n,b.stream.createSegmentIndex(),7);case 7:ua(n,6);break;case 5:return e=va(n),E(n,zn(a,b,e),8);case 8:return n.return();case 6:if(d!=b.stream)return d.closeSegmentIndex&&d.closeSegmentIndex(),b.Ra||
b.Ab||hn(a,b,0),n.return();case 4:if(!b.Qc){n.B(9);break}if(b.Qc.stream.segmentIndex){n.B(9);break}sa(n,11);return E(n,b.Qc.stream.createSegmentIndex(),13);case 13:ua(n,9);break;case 11:va(n);case 9:sa(n,14);f=An(a,b);f!=null&&(hn(a,b,f),b.ue=!1);ua(n,15);break;case 14:return g=va(n),E(n,zn(a,b,g),16);case 16:return n.return();case 15:if(b.type===c.Va)return n.return();h=[];b.stream&&!b.stream.isAudioMuxedInVideo&&h.push(b);k=b.type===c.na?c.Ha:c.na;(l=a.h.get(k))&&l.stream&&!l.stream.isAudioMuxedInVideo&&
h.push(l);if(!a.M||!h.every(function(q){return q.endOfStream})){n.B(0);break}return E(n,a.g.ha.endOfStream(),18);case 18:sh(a.l),m=a.g.ha.getDuration(),m!=0&&m<a.j.presentationTimeline.getDuration()&&a.j.presentationTimeline.Ib(m),H(n)}})}
function An(a,b){if(Bn(b))return gl(a.g.ha,b.stream.originalId||""),null;b.type==vc&&hl(a.g.ha);if(b.stream.isAudioMuxedInVideo&&b.type=="audio")return null;if(b.type!=vc&&Pk(a.g.ha))return Cn(a,!0),null;var c=a.i.updateIntervalSeconds/Math.max(1,Math.abs(a.g.Za()));if(!Vk(a.g.ha)&&b.type!=vc)return c/2;var d=a.g.Ac();if(b.type==="audio")for(var e=u(a.m.keys()),f=e.next();!f.done;f=e.next())f=a.m.get(f.value),f.cb(d,!0),Hm(f,d);e=b.Ua?b.Ua.endTime:d;var g=Zk(a.g.ha,b.type,d);f=Math.max(1,Math.max(a.i.rebufferingGoal,
a.i.bufferingGoal)*a.D);var h=a.j.presentationTimeline.getDuration()-e,k=Yk(a.g.ha,b.type);if(h<1E-6&&k)return b.endOfStream=!0,b.type=="video"&&(a=a.h.get(vc))&&Bn(a)&&(a.endOfStream=!0),null;b.endOfStream=!1;if(g>=f)return c/2;h=!b.Ba;k=Dn(a,b,d,k);if(!k)return c;g=b.zb;var l=k.ia;g&&l&&Ij(l,g)&&(g.g=l.g);g=!1;h&&b.Ig&&(g=!0,b.Ig=!1);h=Infinity;l=Array.from(a.h.values());l=u(l);for(var m=l.next();!m.done;m=l.next())m=m.value,Bn(m)||m.Ba&&!m.Ba.current()||(h=Math.min(h,m.Ua?m.Ua.endTime:d));if(e>=
h+a.j.presentationTimeline.h)return c;b.ma&&b.Ba&&!a.m.has(b.stream)&&(b.ma.cb(k.startTime+.001),Hm(b.ma,k.startTime).catch(function(){}));if(un(a)&&En(a,b,k))return null;Fn(a,b,d,k,g).catch(function(){});b.Qc&&Gn(a,b.Qc,d,f);return null}
function Dn(a,b,c,d){if(b.Ba)return(c=b.Ba.current())&&b.Ua&&Math.abs(b.Ua.startTime-c.startTime)<.001&&(c=b.Ba.next().value),c;if(b.Ua||d)return c=b.Ua?b.Ua.endTime:d,a=a.g.Za()<0,b.stream.segmentIndex&&(b.Ba=b.stream.segmentIndex.hc(c,!1,a)),b.Ba&&b.Ba.next().value;d=a.j.sequenceMode||un(a)?0:a.i.inaccurateManifestTolerance;var e=Math.max(c-d,0);a=a.g.Za()<0;var f=null;d&&(b.stream.segmentIndex&&(b.Ba=b.stream.segmentIndex.hc(e,!1,a)),f=b.Ba&&b.Ba.next().value);f||(b.stream.segmentIndex&&(b.Ba=
b.stream.segmentIndex.hc(c,!1,a)),f=b.Ba&&b.Ba.next().value);return f}
function Fn(a,b,c,d,e){var f,g,h,k,l,m,n,q,r,t,v,w,z,y,A,C,F,D;return Q(function(B){switch(B.g){case 1:f=xc;g=b.stream;h=b.Ba;b.Ra=!0;sa(B,2);if(d.Vc()==2)throw new U(1,1,1011);return E(B,Hn(a,b,d,e),4);case 4:sh(a.l);if(a.F)return B.return();k=g.mimeType=="video/mp4"||g.mimeType=="audio/mp4";l=window.ReadableStream;if((m=a.i.lowLatencyMode&&a.j.isLowLatency)&&l&&k&&(a.j.type!="HLS"||d.u))return r=new Uint8Array(0),v=t=!1,z=function(G){var K,I,J,L;return Q(function(N){switch(N.g){case 1:if(t)return N.return();
v=!0;sh(a.l);if(a.F)return N.return();sa(N,2);r=oc(r,G);K=!1;I=0;(new yh).box("mdat",function(P){I=P.size+P.start;K=!0}).parse(r,!1,!0);if(!K){N.B(4);break}J=r.subarray(0,I);r=r.subarray(I);return E(N,In(a,b,c,g,d,J,!0,e),5);case 5:b.ma&&b.Ba&&Hm(b.ma,d.startTime,!0);case 4:ua(N,0);break;case 2:w=L=va(N),H(N)}})},E(B,Jn(a,b,d,z),9);n=Jn(a,b,d);return E(B,n,7);case 7:q=B.h;sh(a.l);if(a.F)return B.return();sh(a.l);return b.wc?(b.Ra=!1,hn(a,b,0),B.return()):E(B,In(a,b,c,g,d,q,!1,e),6);case 9:y=B.h;if(w)throw w;
if(v){B.B(10);break}t=!0;sh(a.l);return a.F?B.return():b.wc?(b.Ra=!1,hn(a,b,0),B.return()):E(B,In(a,b,c,g,d,y,!1,e),10);case 10:b.ma&&b.Ba&&Hm(b.ma,d.startTime,!0);case 6:sh(a.l);if(a.F)return B.return();b.Ua=d;h.next();b.Ra=!1;b.Th=!1;A=a.g.ha.Rc();C=A[b.type];jb(JSON.stringify(C));b.wc||(F=null,b.type===f.Ha?F=a.h.get(f.na):b.type===f.na&&(F=a.h.get(f.Ha)),F&&F.type==f.na?a.g.Vf(d,b.stream,F.stream.isAudioMuxedInVideo):a.g.Vf(d,b.stream,b.stream.codecs.includes(",")));$m(b);hn(a,b,0);ua(B,0);break;
case 2:D=va(B);sh(a.l,D);if(a.F)return B.return();b.Ra=!1;if(D.code==7001)b.Ra=!1,$m(b),hn(a,b,0),B.B(0);else if(b.type==f.Va&&a.i.ignoreTextStreamFailures)a.h.delete(f.Va),B.B(0);else{if(D.code==3017)return E(B,Kn(a,b,D),0);b.ue=!0;D.category==1&&b.ma&&Nm(b.ma,d);D.severity=2;return E(B,zn(a,b,D),0)}}})}
function Gn(a,b,c,d){var e,f,g,h,k,l,m,n,q,r,t;return Q(function(v){switch(v.g){case 1:e=b.stream;for(h=(g=(f=e.segmentIndex)&&f.hc(c))&&g.next().value;h&&a.O.includes(h.startTime);)h=g&&g.next().value;if(!h){v.B(0);break}k=h.ia;if(!k||Ij(k,b.zb)){v.B(3);break}b.zb=k;sa(v,4);return E(v,Jn(a,b,k),6);case 6:l=v.h;var w=a.g.ha;w.H&&gd(w.H,l,0,e);a.O=[];ua(v,3);break;case 4:throw m=va(v),b.zb=null,m;case 3:if(b.Ua&&b.Ua==h){v.B(0);break}b.Ua=h;sa(v,8);return E(v,Jn(a,b,h),10);case 10:n=v.h;w=a.g.ha;w.H&&
gd(w.H,n,0,e);a.O.push(h.startTime);ua(v,9);break;case 8:throw q=va(v),b.Ua=null,q;case 9:r=Math.max.apply(Math,[0].concat(x(a.O)));t=a.g.Ac();if(t+d>r)return E(v,Gn(a,b,h.startTime,d),0);v.B(0)}})}
function Kn(a,b,c){var d,e,f,g,h,k,l,m,n;return Q(function(q){switch(q.g){case 1:d=Array.from(a.h.values());if(e=d.some(function(r){return r!=b&&r.Th})){q.B(2);break}if(a.i.avoidEvictionOnQuotaExceededError){f=Ln(a,c);if(g=a.g.disableStream(b.stream,f))return q.return();hn(a,b,4);return q.return()}h=Math.round(100*a.D);if(h>20){a.D-=.2;q.B(3);break}if(h>4){a.D-=.04;q.B(3);break}k=Ln(a,c);l=a.g.disableStream(b.stream,k);if(!l){b.ue=!0;a.F=!0;a.g.onError(c);q.B(5);break}a.D=1;m=a.g.Ac();return E(q,
Mn(a,b,m),5);case 5:return q.return();case 3:return b.Th=!0,n=a.g.Ac(),E(q,Mn(a,b,n),2);case 2:hn(a,b,4),H(q)}})}
function Hn(a,b,c,d){var e,f,g,h,k,l,m,n,q,r,t,v,w,z,y,A;return Q(function(C){switch(C.g){case 1:e=xc;f=b.Ua==null;g=[];h=Math.max(0,Math.max(c.appendWindowStart,a.Z)-.1);k=Math.min(c.appendWindowEnd,a.W)+.1;l=c.codecs||b.stream.codecs;m=of(l);n=pf(c.mimeType||b.stream.mimeType);q=c.timestampOffset;if(q==b.Lf&&h==b.Dc&&k==b.Cc&&m==b.Jf&&n==b.Kf){C.B(2);break}r=b.Jf&&b.Kf&&Nl(a.g.ha,b.type,n,l,wn(a));if(!r){C.B(3);break}t=null;b.type===e.Ha?t=a.h.get(e.na):b.type===e.na&&(t=a.h.get(e.Ha));if(!t){C.B(3);
break}return E(C,an(t).catch(function(){}),5);case 5:t.zb=null,t.Dc=null,t.Cc=null,rn(a,t);case 3:return E(C,Nn(a,b,q,h,k,c,m,n),2);case 2:return Ij(c.ia,b.zb)||(b.zb=c.ia,c.l&&c.ia&&(v=Jn(a,b,c.ia),w=function(){var F,D,B,G,K,I,J,L,N,P,O;return Q(function(M){switch(M.g){case 1:return sa(M,2),E(M,v,4);case 4:return F=M.h,sh(a.l),D=null,B=new Map,G={projection:null,hfov:null},b.stream&&(K=b.stream.videoLayout)&&(I=K.split("/"),I.includes("PROJ-RECT")?G.projection="rect":I.includes("PROJ-EQUI")?G.projection=
"equi":I.includes("PROJ-HEQU")?G.projection="hequ":I.includes("PROJ-PRIM")?G.projection="prim":I.includes("PROJ-AIV")&&(G.projection="hequ")),J=new yh,J.box("moov",Dh).box("trak",Dh).box("mdia",Dh).X("mdhd",function(R){D=Vi(R.reader,R.version).timescale}).box("hdlr",function(R){R=R.reader;R.skip(8);switch(R.pd()){case "soun":B.set(e.na,D);break;case "vide":B.set(e.Ha,D)}D=null}),b.type!==e.Ha||G.projection||J.box("minf",Dh).box("stbl",Dh).X("stsd",Fh).box("encv",Gh).box("avc1",Gh).box("avc3",Gh).box("hev1",
Gh).box("hvc1",Gh).box("dvav",Gh).box("dva1",Gh).box("dvh1",Gh).box("dvhe",Gh).box("dvc1",Gh).box("dvi1",Gh).box("vexu",Dh).box("proj",Dh).X("prji",function(R){R=R.reader.pd();G.projection=R}).box("hfov",function(R){R=R.reader.$()/1E3;G.hfov=R}),J.parse(F,!0,!0),b.type===e.Ha&&On(a,G),B.has(b.type)?c.ia.timescale=B.get(b.type):D!=null&&(c.ia.timescale=D),L=b.stream.segmentIndex,L instanceof pm&&(N=rm(L,c.startTime)),P=b.stream.closedCaptions&&b.stream.closedCaptions.size>0,E(M,a.g.Ji(b.type,F),5);
case 5:return E(M,al(a.g.ha,b.type,F,null,b.stream,P,b.sd,d,!1,!1,N),6);case 6:ua(M,0);break;case 2:throw O=va(M),b.zb=null,O;}})},z=c.startTime,f&&(y=Yk(a.g.ha,b.type),y!=null&&(z=y)),a.g.dm(z,c.ia),g.push(w()))),A=b.Ua?b.Ua.i:-1,c.i!=A&&g.push(nl(a.g.ha,b.type,c.startTime)),E(C,Promise.all(g),0)}})}
function Nn(a,b,c,d,e,f,g,h){var k,l,m,n,q;return Q(function(r){switch(r.g){case 1:k=xc;l=wn(a);sa(r,2);b.Dc=d;b.Cc=e;g&&(b.Jf=g);h&&(b.Kf=h);b.Lf=c;m=a.j.sequenceMode||a.j.type=="HLS";n=null;b.type===k.Ha?n=a.h.get(k.na):b.type===k.na&&(n=a.h.get(k.Ha));if(!(n&&n.stream&&n.stream.isAudioMuxedInVideo)){r.B(4);break}return E(r,kl(a.g.ha,n.type,c,d,e,m,n.stream.mimeType,n.stream.codecs,l),4);case 4:return E(r,kl(a.g.ha,b.type,c,d,e,m,f.mimeType||b.stream.mimeType,f.codecs||b.stream.codecs,l),6);case 6:ua(r,
0);break;case 2:throw q=va(r),b.Dc=null,b.Cc=null,b.Jf=null,b.Kf=null,b.Lf=null,q;}})}
function In(a,b,c,d,e,f,g,h){g=g===void 0?!1:g;h=h===void 0?!1:h;var k,l,m,n,q;return Q(function(r){switch(r.g){case 1:return k=d.closedCaptions&&d.closedCaptions.size>0,a.i.shouldFixTimestampOffset&&(l=d.mimeType=="video/mp4"||d.mimeType=="audio/mp4",m=null,e.ia&&(m=e.ia.timescale),(n=l&&m&&d.type==="video"&&a.j.type=="DASH")&&(new yh).box("moof",Dh).box("traf",Dh).X("tfdt",function(t){var v,w,z,y,A,C;return Q(function(F){v=Ui(t.reader,t.version);w=v.baseMediaDecodeTime;if(!w)return F.return();z=
-w/m;y=Number(b.Lf)||0;if(!(y<z))return F.B(0);A=b.Dc;C=b.Cc;return E(F,Nn(a,b,z,A,C,e),0)})}).parse(f,!1,g)),E(r,Mn(a,b,c),2);case 2:return sh(a.l),q=b.sd,b.sd=!1,E(r,a.g.Ji(b.type,f),3);case 3:return E(r,al(a.g.ha,b.type,f,e,d,k,q,h,g),4);case 4:sh(a.l),H(r)}})}
function Mn(a,b,c){var d,e,f,g,h,k,l,m,n;return Q(function(q){if(q.g==1){d=b.stream.segmentIndex;d instanceof pm&&(d.cb(a.j.presentationTimeline.Pb()),e=[],qm(d,function(r){e.push(r.qf())}));f=Math.max(a.i.bufferBehind*a.D,a.j.presentationTimeline.h);g=Wk(a.g.ha,b.type);if(g==null)return a.H==b&&(a.H=null),q.return();h=c-g;k=a.i.evictionGoal;l=a.j.presentationTimeline.jc();m=a.j.presentationTimeline.Ob();n=h-f;m-l>k&&(n=Math.max(h-f,l-k-g));return n<=k?q.return():E(q,a.g.ha.remove(b.type,g,g+n,e),
2)}if(q.g!=4)return sh(a.l),a.H?E(q,Mn(a,a.H,c),4):q.B(0);sh(a.l);H(q)})}function Bn(a){return a&&a.type==vc&&(a.stream.mimeType=="application/cea-608"||a.stream.mimeType=="application/cea-708")}
function Jn(a,b,c,d){var e,f,g,h,k;return Q(function(l){switch(l.g){case 1:if(e=c.kc())return l.return(e);f=null;if(b.ma){var m=b.ma,n=m.g;c instanceof Hj&&(n=m.j);n.has(c)?(m=n.get(c),d&&(m.ni=d),f=m.Ee):f=null}f||(f=xn(c,b.stream,d||null,a.i.retryParameters,a.g.Fc));g=0;b.Ba&&(g=b.Ba.h);b.$a=f;return E(l,f.promise,2);case 2:h=l.h;b.$a=null;k=h.data;if(!c.aesKey){l.B(3);break}return E(l,Wm(k,c.aesKey,g),4);case 4:k=l.h;case 3:return l.return(k)}})}
function xn(a,b,c,d,e,f){f=f===void 0?!1:f;var g=a instanceof Jj?a:void 0,h=g?1:0;a=Xm(a.S(),a.startByte,a.endByte,d,c);a.contentType=b.type;return e.request(ph,a,{type:h,stream:b,segment:g,isPreload:f})}
function tn(a,b,c,d){var e,f;return Q(function(g){if(g.g==1)return b.wc=!1,b.ce=!1,b.Dd=0,b.fc=!0,b.Ua=null,b.Ba=null,b.ma&&!a.m.has(b.stream)&&Om(b.ma),d?(e=a.g.Ac(),f=a.g.ha.getDuration(),E(g,a.g.ha.remove(b.type,e+d,f),3)):E(g,jl(a.g.ha,b.type),4);if(g.g!=3)return sh(a.l),c?E(g,a.g.ha.flush(b.type),3):g.B(3);sh(a.l);b.fc=!1;b.endOfStream=!1;b.Ra||b.Ab||hn(a,b,0);H(g)})}
function hn(a,b,c){var d=b.type;if(d!=vc||a.h.has(d))b.Ab=(new Ff(function(){var e;return Q(function(f){if(f.g==1)return sa(f,2),E(f,yn(a,b),4);if(f.g!=2)return ua(f,0);e=va(f);if(a.g)a.g.onError(e);H(f)})})).Y(c)}function $m(a){a.Ab!=null&&(a.Ab.stop(),a.Ab=null)}function an(a){return Q(function(b){return a.$a?E(b,a.$a.abort(),0):b.B(0)})}
function zn(a,b,c){var d;return Q(function(e){if(e.g==1)return c.code==3024?(b.Ra=!1,$m(b),hn(a,b,0),e.return()):E(e,Vg(a.V),2);sh(a.l);if(c.category===1&&c.code!=1003){if(b.$c)return kn(a,!1),e.return();d=Ln(a,c);c.handled=a.g.disableStream(b.stream,d);c.handled&&(c.severity=1)}if(!c.handled||c.code!=1011)a.g.onError(c);c.handled||a.i.failureCallback(c);H(e)})}function Ln(a,b){return a.i.maxDisabledTime===0&&b.code==1011?1:a.i.maxDisabledTime}
function Cn(a,b){b=b===void 0?!1:b;var c,d,e,f,g,h;return Q(function(k){if(k.g==1){c=Date.now()/1E3;d=a.i.minTimeBetweenRecoveries;if(!b){if(!a.i.allowMediaSourceRecoveries||c-a.P<d)return k.return(!1);a.P=c}e=xc;if(f=a.h.get(e.na))$m(f),f.$a&&(f.$a.abort(),f.$a=null),f.zb=null,f.Dc=null,f.Cc=null,f.Ra=!1,f.wc=!1,f.Dd=0,f.ce=!1,f.fc=!1,f.Ba&&f.Ba.Wh();if(g=a.h.get(e.Ha))$m(g),g.$a&&(g.$a.abort(),g.$a=null),g.zb=null,g.Dc=null,g.Cc=null,g.Ra=!1,g.wc=!1,g.Dd=0,g.ce=!1,g.fc=!1,g.Ba&&g.Ba.Wh();h=a.g.video.paused;
return E(k,Hl(a.g.ha,wn(a)),2)}!g||g.fc||g.Ra||g.Ab||hn(a,g,0);!f||f.fc||f.Ra||f.Ab||hn(a,f,0);h||a.g.video.play();return k.return(!0)})}function On(a,b){if(a.R.projection!=b.projection||a.R.hfov!=b.hfov){if(b.projection!=null||b.hfov!=null){var c=(new Map).set("detail",b);c=new T("spatialvideoinfo",c)}else c=new T("nospatialvideoinfo");c.cancelable=!0;a.g.onEvent(c);a.R=b}}
function un(a){if(a.i.crossBoundaryStrategy!=="keep")return!0;var b=Tb();if(!md()||!b.dd()){b=u(a.h.keys());for(var c=b.next();!c.done;c=b.next())if(c=a.h.get(c.value),c.type!==xc.Va&&(c=c.stream)&&c.fullMimeTypes&&c.fullMimeTypes.size>1)return!0}else if(!b.ng())for(b=u(a.h.keys()),c=b.next();!c.done;c=b.next())if(c=a.h.get(c.value),c.type!==xc.Va&&(c=c.stream)&&c.fullMimeTypes&&c.fullMimeTypes.size>1){a=new Set;b=u(c.fullMimeTypes);for(c=b.next();!c.done;c=b.next())a.add(lf(c.value));return a.size>
1}return!1}function qn(a){a.G.Sa();un(a)&&(a.G.o(a.g.video,"waiting",function(){return vn(a)}),a.G.o(a.g.video,"timeupdate",function(){return vn(a)}))}function vn(a){if(un(a)){a.K.stop();var b=a.g.Ac(),c=a.h.get("video")||a.h.get("audio");c&&(c=c.zb)&&c.g!==null&&(b=c.g-b,b<0||b>1||(a.I=c.g+.1,a.K.Y(b)))}}
function En(a,b,c){if(b.type===vc)return!1;var d=b.zb;if(!d)return!1;var e=c.ia;c=d.g!==e.g;a.i.crossBoundaryStrategy==="reset_to_encrypted"&&(d.encrypted||e.encrypted||(c=!1),d.encrypted&&(a.i.crossBoundaryStrategy="keep"));a.i.crossBoundaryStrategy==="RESET_ON_ENCRYPTION_CHANGE"&&d.encrypted==e.encrypted&&(c=!1);if(a.i.crossBoundaryStrategy==="keep"&&d.mimeType&&e.mimeType){var f=mf(qf(d.mimeType)),g=mf(qf(d.mimeType));d.mimeType==e.mimeType&&f==g&&(c=!1)}c&&(a.J||b.sd)&&(a.J=!1,Cn(a,!0).then(function(){var h=
(new Map).set("oldEncrypted",d.encrypted).set("newEncrypted",e.encrypted);a.g.onEvent(new T("boundarycrossed",h))}));return c}function wn(a,b){function c(f){if(f.fullMimeTypes&&f.fullMimeTypes.size>1&&a.h.has(f.type)){var g=a.h.get(f.type),h=Yk(a.g.ha,g.type),k=a.g.Ac();(g=Dn(a,g,k,h))&&g.codecs&&g.mimeType&&(f.codecs=g.codecs,f.mimeType=g.mimeType)}}b=b===void 0?!1:b;var d=new Map,e=a.u.audio;e&&(c(e),d.set("audio",e));if(e=a.u.video)c(e),d.set("video",e);b&&a.C&&d.set(vc,a.C);return d};function Pn(){}
function Qn(a,b,c,d,e){var f=e in d;var g=f?c.constructor==Object&&Object.keys(d).length==0:c.constructor==Object&&Object.keys(c).length==0;var h=f||g,k=!0,l;for(l in b){var m=e+"."+l,n=f?d[e]:c[l];h||l in c?b[l]===void 0?n===void 0||h?delete a[l]:a[l]=Kd(n):g?a[l]=b[l]:n.constructor==Object&&b[l]&&b[l].constructor==Object?(a[l]||(a[l]=Kd(n)),m=Qn(a[l],b[l],n,d,m),k=k&&m):typeof b[l]!=typeof n||b[l]==null||typeof b[l]!="function"&&b[l].constructor!=n.constructor?(ab("Invalid config, wrong type for "+m),
k=!1):typeof c[l]=="function"&&c[l].length!=b[l].length?(bb("Unexpected number of arguments for "+m),a[l]=b[l]):a[l]=Array.isArray(a[l])?b[l].slice():b[l]:(ab("Invalid config, unrecognized key "+m),k=!1)}return k}function Rn(a,b){for(var c={},d=c,e=0,f=0;;){e=a.indexOf(".",e);if(e<0)break;if(e==0||a[e-1]!="\\")f=a.substring(f,e).replace(/\\\./g,"."),d[f]={},d=d[f],f=e+1;e+=1}d[a.substring(f).replace(/\\\./g,".")]=b;return c}function Sn(a,b){return a&&b}
function Tn(a,b){function c(f){for(var g=u(Object.keys(f)),h=g.next();!h.done;h=g.next())if(h=h.value,!(f[h]instanceof HTMLElement))if(e(f[h])&&Object.keys(f[h]).length===0)delete f[h];else{var k=f[h];Array.isArray(k)&&k.length===0?delete f[h]:typeof f[h]=="function"?delete f[h]:e(f[h])&&(c(f[h]),Object.keys(f[h]).length===0&&delete f[h])}}function d(f,g){return Object.keys(f).reduce(function(h,k){var l=f[k];if(g.hasOwnProperty(k))if(l instanceof HTMLElement&&g[k]instanceof HTMLElement)l.isEqualNode(g[k])||
(h[k]=l);else if(e(l)&&e(g[k])){if(l=d(l,g[k]),Object.keys(l).length>0||!e(l))h[k]=l}else Array.isArray(l)&&Array.isArray(g[k])?Uc(l,g[k])||(h[k]=l):Number.isNaN(l)&&Number.isNaN(g[k])||l!==g[k]&&(h[k]=l);else h[k]=l;return h},{})}function e(f){return f&&typeof f==="object"&&!Array.isArray(f)}a=d(a,b);c(a);return a}S("shaka.util.ConfigUtils",Pn);Pn.getDifferenceFromConfigObjects=Tn;Pn.convertToConfigObject=Rn;Pn.mergeConfigObjects=Qn;S("shaka.config.RepeatMode",{OFF:0,ALL:1,SINGLE:2});function Un(){}function Vn(a){a=ac(a);return(new tb(a)).Lb}function Wn(a,b,c){function d(h){Pb(f).setUint32(g,h.byteLength,!0);g+=4;f.set(Lb(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new U(2,6,6015);var e;typeof b=="string"?e=cc(b,!0):e=b;a=ac(a);a=cc(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}function Xn(a,b,c){if(b!=="skd")return a;b=c.serverCertificate;c=ac(a).split("skd://").pop();return Wn(a,c,b)}
function Yn(a,b){a===2&&(a=b.drmInfo)&&Hg(a.keySystem)&&(b.headers["Content-Type"]="application/octet-stream")}S("shaka.drm.FairPlay",Un);
Un.commonFairPlayResponse=function(a,b){if(a===2&&(a=b.originalRequest.drmInfo)&&Hg(a.keySystem)){try{var c=Yb(b.data)}catch(e){return}a=!1;c=c.trim();c.substr(0,5)==="<ckc>"&&c.substr(-6)==="</ckc>"&&(c=c.slice(5,-6),a=!0);if(!a)try{var d=JSON.parse(c);d.ckc&&(c=d.ckc,a=!0);d.CkcMessage&&(c=d.CkcMessage,a=!0);d.License&&(c=d.License,a=!0)}catch(e){}a&&(b.data=Mb(lc(c)))}};Un.muxFairPlayRequest=function(a,b){Yn(a,b)};
Un.expressplayFairPlayRequest=function(a,b){if(a===2){var c=b.drmInfo;c&&Hg(c.keySystem)&&Yn(a,b)}};Un.conaxFairPlayRequest=function(a,b){Yn(a,b)};Un.ezdrmFairPlayRequest=function(a,b){Yn(a,b)};Un.verimatrixFairPlayRequest=function(a,b){a===2&&(a=b.drmInfo)&&Hg(a.keySystem)&&(a=Lb(b.body),a=jc(a),b.headers["Content-Type"]="application/x-www-form-urlencoded",b.body=bc("spc="+a))};Un.muxInitDataTransform=function(a,b,c){return Xn(a,b,c)};
Un.expressplayInitDataTransform=function(a,b,c){return Xn(a,b,c)};Un.conaxInitDataTransform=function(a,b,c){if(b!=="skd")return a;b=c.serverCertificate;c=ac(a).split("skd://").pop().split("?").shift();c=window.atob(c);var d=new ArrayBuffer(c.length*2);d=Ob(d);for(var e=0,f=c.length;e<f;e++)d[e]=c.charCodeAt(e);return Wn(a,d,b)};Un.ezdrmInitDataTransform=function(a,b,c){if(b!=="skd")return a;b=c.serverCertificate;c=ac(a).split(";").pop();return Wn(a,c,b)};
Un.verimatrixInitDataTransform=function(a,b,c){return Xn(a,b,c)};Un.initDataTransform=Wn;Un.defaultGetContentId=Vn;Un.isFairPlaySupported=function(){var a;return Q(function(b){if(b.g==1)return a={initDataTypes:["cenc","sinf","skd"],videoCapabilities:[{contentType:'video/mp4; codecs="avc1.42E01E"'}]},sa(b,2),E(b,navigator.requestMediaKeySystemAccess("com.apple.fps",[a]),4);if(b.g!=2)return b.return(!0);va(b);return b.return(!1)})};function Zn(a,b,c){c=c===void 0?!0:c;this.h=a;this.g=new Set([a]);b=b||[];a=u(b);for(b=a.next();!b.done;b=a.next())this.add(b.value,c)}
Zn.prototype.add=function(a,b){var c=this.h;b=b===void 0?!0:b;var d;if(!(d=!!c.audio!=!!a.audio||!!c.video!=!!a.video||c.language!=a.language)&&(d=c.audio&&a.audio)){d=c.audio;var e=a.audio;d=!(!((!d.channelsCount||!e.channelsCount||d.channelsCount>2||e.channelsCount>2)&&d.channelsCount!=e.channelsCount||d.spatialAudio!==e.spatialAudio||b&&!$n(d,e))&&Uc(d.roles,e.roles)&&d.groupId===e.groupId)}!d&&(d=c.video&&a.video)&&(c=c.video,d=a.video,d=!((!b||$n(c,d))&&Uc(c.roles,d.roles)));return d?!1:(this.g.add(a),
!0)};Zn.prototype.values=function(){return this.g.values()};function $n(a,b){if(a.mimeType!=b.mimeType)return!1;a=a.codecs.split(",").map(function(c){return of(c)});b=b.codecs.split(",").map(function(c){return of(c)});return Uc(a,b)}S("shaka.media.AdaptationSet",Zn);function ao(){this.h=this.g=null}ao.prototype.configure=function(a){this.g=a};ao.prototype.getConfiguration=function(){return this.g};
ao.prototype.create=function(a){var b;if(this.g.language){var c=bo(a,this.g.language);c.length&&(b=c)}b||(b=a.filter(function(f){return f.primary}),b=b.length?b:a);a=co(b,this.g.role);a.length&&(b=a);a=eo(b,this.g.videoRole);a.length&&(b=a);this.g.videoLayout&&(a=fo(b,this.g.videoLayout),a.length&&(b=a));this.g.hdrLevel&&(a=go(b,this.g.hdrLevel),a.length&&(b=a));var d=[this.g.channelCount,this.g.preferredAudioChannelCount];a=d.filter(function(f,g){return f&&d.indexOf(f)===g});if(a.length)for(a=u(a),
c=a.next();!c.done;c=a.next())if(c=ho(b,c.value),c.length){b=c;break}this.g.audioLabel&&(a=io(b,this.g.audioLabel),a.length&&(b=a));this.g.videoLabel&&(a=jo(b,this.g.videoLabel),a.length&&(b=a));a=ko(b,this.g.spatialAudio);a.length&&(b=a);var e=[this.g.audioCodec,this.g.activeAudioCodec].concat(x(this.g.preferredAudioCodecs));a=e.filter(function(f,g){return f&&e.indexOf(f)===g});if(a.length)for(a=u(a),c=a.next();!c.done;c=a.next())if(c=lo(b,c.value),c.length){b=c;break}return this.h=new Zn(b[0],b,
!(this.g.codecSwitchingStrategy=="smooth"&&md()))};ao.prototype.getLastAdaptationSet=function(){return this.h};function bo(a,b){b=Bc(b);var c=Kc(b,a.map(function(d){return Jc(d)}));return c?a.filter(function(d){return c==Jc(d)}):[]}function co(a,b){return a.filter(function(c){return c.audio?b?c.audio.roles.includes(b):c.audio.roles.length==0:!1})}function eo(a,b){return a.filter(function(c){return c.video?b?c.video.roles.includes(b):c.video.roles.length==0:!1})}
function io(a,b){return a.filter(function(c){return c.audio&&c.audio.label?c.audio.label.toLowerCase()==b.toLowerCase():!1})}function jo(a,b){return a.filter(function(c){return c.video&&c.video.label?c.video.label.toLowerCase()==b.toLowerCase():!1})}function ho(a,b){return a.filter(function(c){return c.audio&&c.audio.channelsCount&&c.audio.channelsCount>b?!1:!0}).sort(function(c,d){return c.audio||d.audio?c.audio?d.audio?(d.audio.channelsCount||0)-(c.audio.channelsCount||0):1:-1:0})}
function go(a,b){if(b=="AUTO"){var c=a.some(function(d){return d.video&&d.video.hdr&&d.video.hdr=="HLG"?!0:!1});b=Tb().Jd(c)}return a.filter(function(d){return d.video&&d.video.hdr&&d.video.hdr!=b?!1:!0})}function fo(a,b){return a.filter(function(c){return c.video&&c.video.videoLayout&&c.video.videoLayout!=b?!1:!0})}function ko(a,b){return a.filter(function(c){return c.audio&&c.audio.spatialAudio!=b?!1:!0})}function lo(a,b){return a.filter(function(c){return c.audio&&c.audio.codecs!=b?!1:!0})};function mo(){}
function no(){var a=Infinity,b=Tb();navigator.connection&&navigator.connection.saveData&&(a=360);var c={retryParameters:Ug(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,persistentSessionOnlinePlayback:!1,persistentSessionsMetadata:[],initDataTransform:function(h,k,l){"apple"===window.shakaMediaKeysPolyfill&&k=="skd"&&(k=l.serverCertificate,l=Vn(h),h=Wn(h,l,k));return h},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[],keySystemsMapping:{},parseInbandPsshEnabled:!1,
minHdcpVersion:"",ignoreDuplicateInitData:!0,defaultAudioRobustnessForWidevine:"SW_SECURE_CRYPTO",defaultVideoRobustnessForWidevine:"SW_SECURE_DECODE",useFlutterClearKey:!1},d="reload";md()&&b.dd()&&(d="smooth");var e={retryParameters:Ug(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,disableIFrames:!1,defaultPresentationDelay:0,segmentRelativeVttTiming:!1,raiseFatalErrorOnManifestUpdateRequestFailure:!1,continueLoadingWhenPaused:!0,ignoreSupplementalCodecs:!1,
updatePeriod:-1,ignoreDrmInfo:!1,enableAudioGroups:!0,dash:{clockSyncUri:"",disableXlinkProcessing:!0,xlinkFailGracefully:!1,ignoreMinBufferTime:!1,autoCorrectDrift:!0,initialSegmentLimit:1E3,ignoreSuggestedPresentationDelay:!1,ignoreEmptyAdaptationSet:!1,ignoreMaxSegmentDuration:!1,keySystemsByURI:{"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha",
"urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:94ce86fb-07ff-4f43-adb8-93d2fa968ca2":"com.apple.fps","urn:uuid:3d5e6d35-9b9a-41e8-b843-dd3c6e72c42c":"com.huawei.wiseplay"},manifestPreprocessor:oo,manifestPreprocessorTXml:po,sequenceMode:!1,useStreamOnceInPeriodFlattening:!1,enableFastSwitching:!0},hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,defaultAudioCodec:"mp4a.40.2",
defaultVideoCodec:"avc1.42E01E",ignoreManifestProgramDateTime:!1,ignoreManifestProgramDateTimeForTypes:[],mediaPlaylistFullMimeType:'video/mp2t; codecs="avc1.42E01E, mp4a.40.2"',liveSegmentsDelay:3,sequenceMode:b.wd(),ignoreManifestTimestampsInSegmentsMode:!1,disableCodecGuessing:!1,disableClosedCaptionsDetection:!1,allowLowLatencyByteRangeOptimization:!0,allowRangeRequestsToGuessMimeType:!1},mss:{manifestPreprocessor:oo,manifestPreprocessorTXml:po,sequenceMode:!1,keySystemsBySystemId:{"9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready",
"79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready"}}},f={trackSelectionCallback:function(h){return Q(function(k){return k.return(h)})},downloadSizeCallback:function(h){var k;return Q(function(l){if(l.g==1)return navigator.storage&&navigator.storage.estimate?E(l,navigator.storage.estimate(),3):l.return(!0);k=l.h;return l.return(k.usage+h<k.quota*.95)})},progressCallback:function(h,k){return Sn([h,k])},usePersistentLicense:!0,numberOfParallelDownloads:5},g={drm:c,manifest:e,streaming:{retryParameters:Ug(),
failureCallback:function(h){return Sn([h])},rebufferingGoal:0,bufferingGoal:10,bufferBehind:30,evictionGoal:1,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.5,gapPadding:0,gapJumpTimerTime:.25,durationBackoff:1,safeSeekOffset:5,safeSeekEndOffset:0,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsForFairPlay:!0,inaccurateManifestTolerance:2,lowLatencyMode:!0,preferNativeDash:!1,preferNativeHls:!1,updateIntervalSeconds:1,observeQualityChanges:!1,
maxDisabledTime:30,segmentPrefetchLimit:1,prefetchAudioLanguages:[],disableAudioPrefetch:!1,disableTextPrefetch:!1,disableVideoPrefetch:!1,liveSync:{enabled:!1,targetLatency:.5,targetLatencyTolerance:.5,maxPlaybackRate:1.1,minPlaybackRate:.95,panicMode:!1,panicThreshold:60,dynamicTargetLatency:{enabled:!1,stabilityThreshold:60,rebufferIncrement:.5,maxAttempts:10,maxLatency:4,minLatency:1}},allowMediaSourceRecoveries:!0,minTimeBetweenRecoveries:5,vodDynamicPlaybackRate:!1,vodDynamicPlaybackRateLowBufferRate:.95,
vodDynamicPlaybackRateBufferRatio:.5,preloadNextUrlWindow:30,loadTimeout:30,clearDecodingCache:!1,dontChooseCodecs:!1,shouldFixTimestampOffset:!1,avoidEvictionOnQuotaExceededError:!1,crossBoundaryStrategy:"keep",returnToEndOfLiveWindowWhenOutside:!1},networking:{forceHTTP:!1,forceHTTPS:!1,minBytesForProgressEvents:16E3},mediaSource:{codecSwitchingStrategy:d,addExtraFeaturesToSourceBuffer:function(h){return Sn([h],"")},forceTransmux:!1,insertFakeEncryptionInInit:!0,correctEc3Enca:!1,modifyCueCallback:function(h,
k){return Sn([h,k])},dispatchAllEmsgBoxes:!1,useSourceElements:!0,durationReductionEmitsUpdateEnd:!0},offline:f,abrFactory:function(){return new wg},adaptationSetCriteriaFactory:function(){return new (Function.prototype.bind.apply(ao,[null].concat(x(Na.apply(0,arguments)))))},abr:{enabled:!0,useNetworkInformation:!0,defaultBandwidthEstimate:1E6,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:a,minPixels:0,maxPixels:Infinity,
minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity,minChannelsCount:0,maxChannelsCount:Infinity},advanced:{minTotalBytes:128E3,minBytes:16E3,fastHalfLife:2,slowHalfLife:5},restrictToElementSize:!1,restrictToScreenSize:!1,ignoreDevicePixelRatio:!1,clearBufferSwitch:!1,safeMarginSwitch:0,cacheLoadThreshold:5,minTimeToSwitch:0,preferNetworkInformationBandwidth:!1,removeLatencyFromFirstPacketTime:!0},autoShowText:3,preferredAudioLanguage:"",preferredAudioLabel:"",preferredTextLanguage:"",
preferredAudioRole:"",preferredVideoRole:"",preferredTextRole:"",preferredAudioChannelCount:2,preferredVideoHdrLevel:"AUTO",preferredVideoLayout:"",preferredVideoLabel:"",preferredVideoCodecs:[],preferredAudioCodecs:[],preferredTextFormats:[],preferForcedSubs:!1,preferSpatialAudio:!1,preferredDecodingAttributes:[],restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity,minChannelsCount:0,
maxChannelsCount:Infinity},playRangeStart:0,playRangeEnd:Infinity,textDisplayer:{captionsUpdatePeriod:.25,fontScaleFactor:1},textDisplayFactory:function(){return null},cmcd:{enabled:!1,sessionId:"",contentId:"",rtpSafetyFactor:5,useHeaders:!1,includeKeys:[],version:1,targets:[]},cmsd:{enabled:!0,applyMaximumSuggestedBitrate:!0,estimatedThroughputWeightRatio:.5},lcevc:{enabled:!1,dynamicPerformanceScaling:!0,logLevel:0,drawLogo:!1,poster:!0},ads:{customPlayheadTracker:!1,skipPlayDetection:!1,supportsMultipleMediaElements:!0,
disableHLSInterstitial:!1,disableDASHInterstitial:!1,allowPreloadOnDomElements:!0,allowStartInMiddleOfInterstitial:!0},ignoreHardwareResolution:!1,queue:{preloadNextUrlWindow:Infinity,preloadPrevItem:!0,repeatMode:0}};f.trackSelectionCallback=function(h){return Q(function(k){return k.return(qo(h,g.preferredAudioLanguage,g.preferredVideoHdrLevel))})};return b.ab(g)}
function ro(){return{streaming:{inaccurateManifestTolerance:0,segmentPrefetchLimit:2,updateIntervalSeconds:.1,maxDisabledTime:1,retryParameters:{baseDelay:100}},manifest:{dash:{autoCorrectDrift:!1},retryParameters:{baseDelay:100}},drm:{retryParameters:{baseDelay:100}}}}
function so(a,b,c){var d={".drm.keySystemsMapping":"",".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:[],audioRobustness:[],sessionType:"",serverCertificate:new Uint8Array(0),serverCertificateUri:"",individualizationServer:"",headers:{}}};return Qn(a,b,c||no(),d,"")}
function qo(a,b,c){var d=c;d=="AUTO"&&(c=a.some(function(h){return h.hdr&&h.hdr=="HLG"?!0:!1}),d=Tb().Jd(c));var e=a.filter(function(h){return h.type!="variant"||h.hdr&&h.hdr!=d?!1:!0});c=[];var f=Kc(b,e.map(function(h){return h.language}));f&&(c=e.filter(function(h){return Bc(h.language)==f}));c.length==0&&(c=e.filter(function(h){return h.primary}));c.length==0&&(e.map(function(h){return h.language}),c=e);var g=c.filter(function(h){return h.height&&h.height<=480});g.length&&(g.sort(function(h,k){return k.height-
h.height}),c=g.filter(function(h){return h.height==g[0].height}));b=[];c.length&&(e=Math.floor(c.length/2),c.sort(function(h,k){return h.bandwidth-k.bandwidth}),b.push(c[e]));a=u(a);for(c=a.next();!c.done;c=a.next())c=c.value,c.type!=vc&&c.type!="image"||b.push(c);return b}function oo(a){return Sn([a],a)}function po(a){return Sn([a],a)}S("shaka.util.PlayerConfiguration",mo);mo.mergeConfigObjects=so;mo.createDefaultForLL=ro;mo.createDefault=no;function to(){this.g=null;this.h=[]}function uo(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);a=u(a.h);for(var d=a.next();!d.done;d=a.next())d=d.value,c+=d.state==b?d.duration:0;return c}function vo(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=u(a.h),e=d.next();!e.done;e=d.next())c.push(b(e.value));a.g&&c.push(b(a.g));return c};function wo(){this.i=this.h=null;this.g=[]}function xo(a,b,c){a.i!=b&&(a.i=b,a.g.push({timestamp:Date.now()/1E3,id:b.id,type:"text",fromAdaptation:c,bandwidth:null}))};function yo(){this.D=this.V=NaN;this.l="";this.j=this.mj=this.A=this.C=this.K=this.F=this.u=this.m=this.J=this.G=this.i=this.R=this.T=this.M=this.O=this.P=NaN;this.L=0;this.H=this.I=NaN;this.g=new to;this.h=new wo}function zo(a,b,c){a.P=b;a.O=c}function Ao(a,b,c){a.V=b;a.D=c}function Bo(a,b){a.i=isNaN(a.i)?b:Math.max(a.i,b)}function Co(a,b){a.j=isNaN(a.j)?b:a.j+b}
function Do(a){var b=a.V,c=a.D,d=a.l,e=a.C,f=a.O,g=a.P,h=a.M,k=a.T,l=a.R,m=a.A,n=a.i,q=a.G,r=a.J,t=a.m,v=uo(a.g,"playing"),w=uo(a.g,"paused"),z=uo(a.g,"buffering"),y=a.u,A=a.F,C=a.K,F=a.mj,D=a.j,B=a.L,G=a.I,K=a.H,I=vo(a.g),J=[];a=u(a.h.g);for(var L=a.next();!L.done;L=a.next())L=L.value,J.push({timestamp:L.timestamp,id:L.id,type:L.type,fromAdaptation:L.fromAdaptation,bandwidth:L.bandwidth});return{width:b,height:c,currentCodecs:d,streamBandwidth:e,decodedFrames:f,droppedFrames:g,corruptedFrames:h,
stallsDetected:k,gapsJumped:l,estimatedBandwidth:m,completionPercent:n,loadLatency:q,manifestTimeSeconds:r,drmTimeSeconds:t,playTime:v,pauseTime:w,bufferingTime:z,licenseTime:y,liveLatency:A,maxSegmentDuration:C,manifestSizeBytes:F,bytesDownloaded:D,nonFatalErrorCount:B,manifestPeriodCount:G,manifestGapCount:K,stateHistory:I,switchHistory:J}};function Eo(a,b,c,d){mb.call(this);this.M=a;this.T=b;this.ya=d.networkingEngine;this.u=c;this.D=null;this.sa=0;this.La=d.Ed;this.G=d.Wl;this.Na=d.Xl;this.g=d.config;this.m=this.H=this.h=null;this.ea=!1;this.I=d.jm;this.oa=!1;this.j=null;this.Z=!1;this.A=null;this.L=new Map;this.ra=!1;this.Fa=d.im;this.V=new yo;this.aa=new Kg;this.C=new Kg;this.O=null;this.l=!1;this.W=d.vk;this.R=this.i=null;this.P=!1;this.K=[];this.J=[];this.F=!0}ma(Eo,mb);function Fo(a,b,c){(a=b?a.J:a.K)?a.push(c):c()}
function Go(a){if(a.J)for(var b=u(a.J),c=b.next();!c.done;c=b.next())c=c.value,c();a.J=null}function Ho(a,b){a.O=b;a.P=!0;if(a.K){b=u(a.K);for(var c=b.next();!c.done;c=b.next())c=c.value,c()}a.K=null}p=Eo.prototype;p.getStartTime=function(){return this.u};p.kd=function(){return this.M};p.uh=function(){return this.h};function Io(a){a.oa=!0;return a.I}p.getStats=function(){return this.V};function Jo(a){a.Z=!0;return a.j}p.ol=function(){return this.i?gg(this.i):null};
p.ll=function(){return this.R?hg(this.R):null};function Ko(a){a.ra=!0;return a.L}
p.start=function(){var a=this;(function(){var b;return Q(function(c){switch(c.g){case 1:return E(c,Promise.resolve(),2);case 2:return sa(c,3),E(c,Lo(a),5);case 5:Mo(a);if("webkit"===window.shakaMediaKeysPolyfill){c.B(6);break}return E(c,No(a),7);case 7:Mo(a);case 6:return E(c,Oo(a),8);case 8:Mo(a);if(!a.W){c.B(9);break}return E(c,Po(a),10);case 10:Mo(a);case 9:if(!a.W||!a.j){c.B(11);break}return E(c,ti(a.j),12);case 12:Mo(a);case 11:a.C.resolve();ua(c,0);break;case 3:b=va(c),b instanceof U&&(b.code==
7001||b.code==7003)||a.C.reject(b),H(c)}})})()};p.dispatchEvent=function(a){return this.O?this.O.dispatchEvent(a):mb.prototype.dispatchEvent.call(this,a)};p.onError=function(a){a.severity===2&&(this.C.reject(a),this.destroy());var b=(new Map).set("detail",a);b=new T("error",b);this.dispatchEvent(b);b.defaultPrevented&&(a.handled=!0)};function Mo(a){if(a.l)throw new U(2,7,7003);}function Qo(a,b){a.dispatchEvent(new T("onstatechange",(new Map).set("state",b)))}
function Lo(a){var b,c,d,e,f,g;return Q(function(h){switch(h.g){case 1:Qo(a,"manifest-parser");a.m||(a.H=Si(a.M,a.T),a.m=a.H(),a.m.configure(a.g.manifest,function(){return a.F}));b=Date.now()/1E3;Qo(a,"manifest");if(a.h){h.B(2);break}return E(h,a.m.start(a.M,a.Na),3);case 3:return a.h=h.h,Ro(a.h),E(h,So(a),2);case 2:return a.aa.resolve(),c=new T("manifestparsed",void 0),E(h,Promise.resolve(),5);case 5:a.dispatchEvent(c);if(a.h.variants.length==0)throw new U(2,4,4036);Ro(a.h);d=Ii(a.G,a.h);if(!d){h.B(6);
break}e=new T("trackschanged",void 0);return E(h,Promise.resolve(),7);case 7:Mo(a),a.dispatchEvent(e);case 6:f=Date.now()/1E3,g=f-b,a.V.J=g,H(h)}})}
function No(a,b){var c,d,e,f;return Q(function(g){switch(g.g){case 1:window.__SHAKA_PRELOAD_INIT_DRM_CALLED__=!0;if(!a.h||a.j)return g.return();Qo(a,"drm-engine");a.sa=Date.now()/1E3;a.j=a.La();a.G.h=a.j;a.j.configure(a.g.drm,function(){return a.F});c=pg(a.h.variants);d=!0;a.h&&a.h.presentationTimeline&&(d=a.h.presentationTimeline.U());return E(g,Sh(a.j,c,a.h.offlineSessionIds,d),2);case 2:Mo(a);if(!b){g.B(3);break}return E(g,a.j.ec(b),4);case 4:Mo(a);case 3:return E(g,Gi(a.G,a.h),5);case 5:e=g.h;
if(!e){g.B(0);break}f=new T("trackschanged",void 0);return E(g,Promise.resolve(),7);case 7:a.dispatchEvent(f),H(g)}})}p.configure=function(a,b){a=Rn(a,b);so(this.g,a)};p.getConfiguration=function(){return Kd(this.g)};
function So(a){return Q(function(b){a.D||(a.D=a.g.adaptationSetCriteriaFactory(),a.D.configure({language:a.g.preferredAudioLanguage,role:a.g.preferredAudioRole,videoRole:a.g.preferredVideoRole,channelCount:a.g.preferredAudioChannelCount,hdrLevel:a.g.preferredVideoHdrLevel,spatialAudio:a.g.preferSpatialAudio,videoLayout:a.g.preferredVideoLayout,audioLabel:a.g.preferredAudioLabel,videoLabel:a.g.preferredVideoLabel,codecSwitchingStrategy:a.g.mediaSource.codecSwitchingStrategy,audioCodec:"",activeAudioCodec:"",
activeAudioChannelCount:0,preferredAudioCodecs:a.g.preferredAudioCodecs,preferredAudioChannelCount:a.g.preferredAudioChannelCount}));if(a.i||!a.h.variants.length||a.h.variants.length!=1&&a.h.type!="HLS")return b.B(0);a.i=To(a);return a.i?E(b,Uo(a.i),0):b.B(0)})}function Oo(a){return Q(function(b){if(b.g==1)return!a.i||a.h.variants.includes(a.i)?b.B(0):E(b,Vo(a.i),3);a.i=To(a);return a.i?E(b,Uo(a.i),0):b.B(0)})}
function Po(a){var b,c,d,e,f;return Q(function(g){!a.i&&(b=To(a))&&(a.i=b);if(!a.i)return g.B(0);c=a.h.presentationTimeline.U();d=[];e=a.i;e.video&&d.push(Wo(a,e.video,c));e.audio&&d.push(Wo(a,e.audio,c));(f=qg(a.h.textStreams,a.g.preferredTextLanguage,a.g.preferredTextRole,a.g.preferForcedSubs)[0]||null)&&ug(e.audio,f,a.g)&&(d.push(Wo(a,f,c)),a.R=f);return E(g,Promise.all(d),0)})}
function To(a){if(!a.A){var b=a.g.abrFactory;a.A=b();a.A.configure(a.g.abr)}b=pg(a.h.variants);b=a.D.create(b);a.A.setVariants(Array.from(b.values()));return a.A.chooseVariant(!0)}
function Wo(a,b,c){var d,e,f,g,h;return Q(function(k){if(k.g==1)return d=a.g.streaming.segmentPrefetchLimit||2,e=new Fm(d,b,function(l,m,n){return xn(l,m,n||null,a.g.streaming.retryParameters,a.ya,a.F)},!1),a.L.set(b.id,e),b.segmentIndex?k.B(2):E(k,b.createSegmentIndex(),2);f=typeof a.u==="number"?a.u:0;g=b.segmentIndex.hc(f);h=null;g&&(h=g.current(),h||(h=g.next().value));h||(h=jg(b.segmentIndex));return h?c?h.ia?E(k,Im(e,h.ia),0):k.B(0):E(k,Hm(e,h.startTime),0):k.B(0)})}
function Uo(a){var b,c,d,e;return Q(function(f){b=[];c=u([a.video,a.audio]);for(d=c.next();!d.done;d=c.next())(e=d.value)&&!e.segmentIndex&&b.push(e.createSegmentIndex());return b.length>0?E(f,Promise.all(b),0):f.B(0)})}function Vo(a){var b,c,d,e;return Q(function(f){b=[];c=u([a.video,a.audio]);for(d=c.next();!d.done;d=c.next())(e=d.value)&&e.segmentIndex&&e.closeSegmentIndex&&b.push(e.closeSegmentIndex());return b.length>0?E(f,Promise.all(b),0):f.B(0)})}p.Nm=function(){return this.C};
p.destroy=function(){var a=this,b,c,d;return Q(function(e){if(e.g==1)return a.l=!0,!a.m||a.ea?e.B(2):E(e,a.m.stop(),2);if(e.g!=4)return a.A&&a.A.release(),a.I&&!a.oa&&a.I.release(),!a.j||a.Z?e.B(4):E(e,a.j.destroy(),4);if(a.L.size>0&&!a.ra)for(b=u(a.L.values()),c=b.next();!c.done;c=b.next())d=c.value,Om(d);H(e)})};function Ro(a){function b(c){return c.video&&c.audio||c.video&&c.video.codecs.includes(",")}a.variants.some(b)&&(a.variants=a.variants.filter(b))}S("shaka.media.PreloadManager",Eo);
Eo.prototype.destroy=Eo.prototype.destroy;Eo.prototype.waitForFinish=Eo.prototype.Nm;Eo.prototype.getPrefetchedTextTrack=Eo.prototype.ll;Eo.prototype.getPrefetchedVariantTrack=Eo.prototype.ol;function Xo(a,b){mb.call(this);var c=this;this.i=a;this.l=b;this.g=new Map;this.m=[{Bd:null,zd:Yo,wb:function(d,e){return Zo(c,"enter",d,e)}},{Bd:$o,zd:Yo,wb:function(d,e){return Zo(c,"enter",d,e)}},{Bd:ap,zd:Yo,wb:function(d,e){return Zo(c,"enter",d,e)}},{Bd:Yo,zd:$o,wb:function(d,e){return Zo(c,"exit",d,e)}},{Bd:Yo,zd:ap,wb:function(d,e){return Zo(c,"exit",d,e)}},{Bd:$o,zd:ap,wb:function(d,e){e?Zo(c,"skip",d,e):(Zo(c,"enter",d,e),Zo(c,"exit",d,e))}},{Bd:ap,zd:$o,wb:function(d,e){return Zo(c,"skip",
d,e)}}];this.h=new Wc;this.h.o(this.i,"regionremove",function(d){c.g.delete(d.region)})}ma(Xo,mb);Xo.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;mb.prototype.release.call(this)};
Xo.prototype.j=function(a,b){if(!this.l||a!=0){this.l=!1;for(var c=u(this.i.h.values()),d=c.next();!d.done;d=c.next()){d=d.value;var e=this.g.get(d),f=a<d.startTime?$o:a>d.endTime?ap:Yo;this.g.set(d,f);for(var g=u(this.m),h=g.next();!h.done;h=g.next())h=h.value,h.Bd==e&&h.zd==f&&h.wb(d,b)}}};function Zo(a,b,c,d){b=new T(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var $o=1,Yo=2,ap=3;function bp(a,b,c){var d,e,f,g,h,k,l;return Q(function(m){switch(m.g){case 1:d=cp(a);if(e=dp.get(d))return m.return(e);f=0;g=jh([a],c);sa(m,2);g.method="HEAD";return E(m,b.request(f,g).promise,4);case 4:h=m.h;e=h.headers["content-type"];ua(m,3);break;case 2:k=va(m);if(!k||k.code!=1002&&k.code!=1001){m.B(3);break}g.method="GET";return E(m,b.request(f,g).promise,6);case 6:l=m.h,e=l.headers["content-type"];case 3:return m.return(e?e.toLowerCase().split(";").shift():"")}})}
function cp(a){a=(new tb(a)).Vb.split("/").pop().split(".");return a.length==1?"":a.pop().toLowerCase()}
var dp=(new Map).set("mp4","video/mp4").set("m4v","video/mp4").set("m4a","audio/mp4").set("webm","video/webm").set("weba","audio/webm").set("mkv","video/webm").set("ts","video/mp2t").set("ogv","video/ogg").set("ogg","audio/ogg").set("mpg","video/mpeg").set("mpeg","video/mpeg").set("mov","video/quicktime").set("m3u8","application/x-mpegurl").set("mpd","application/dash+xml").set("ism","application/vnd.ms-sstr+xml").set("mp3","audio/mpeg").set("aac","audio/aac").set("flac","audio/flac").set("wav","audio/wav").set("sbv",
"text/x-subviewer").set("srt","text/srt").set("vtt","text/vtt").set("webvtt","text/vtt").set("ttml","application/ttml+xml").set("lrc","application/x-subtitle-lrc").set("ssa","text/x-ssa").set("ass","text/x-ssa").set("jpeg","image/jpeg").set("jpg","image/jpeg").set("png","image/png").set("svg","image/svg+xml").set("webp","image/webp").set("avif","image/avif").set("html","text/html").set("htm","text/html");/*
 @license
 Copyright 2013 Ali Al Dallal

 Licensed under the MIT license.

 Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the "Software"), to deal
 in the Software without restriction, including without limitation the rights
 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 copies of the Software, and to permit persons to whom the Software is
 furnished to do so, subject to the following conditions:

 The above copyright notice and this permission notice shall be included in
 all copies or substantial portions of the Software.

 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 SOFTWARE.
*/
for(var ep={ach:"Lwo",ady:"\u0410\u0434\u044b\u0433\u044d\u0431\u0437\u044d",af:"Afrikaans","af-NA":"Afrikaans (Namibia)","af-ZA":"Afrikaans (South Africa)",ak:"T\u0255\u0265i",ar:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629","ar-AR":"\u0627\u0644\u0639\u0631\u0628\u064a\u0629","ar-MA":"\u0627\u0644\u0639\u0631\u0628\u064a\u0629","ar-SA":"\u0627\u0644\u0639\u0631\u0628\u064a\u0629 (\u0627\u0644\u0633\u0639\u0648\u062f\u064a\u0629)","ay-BO":"Aymar aru",az:"Az\u0259rbaycan dili","az-AZ":"Az\u0259rbaycan dili",
"be-BY":"\u0411\u0435\u043b\u0430\u0440\u0443\u0441\u043a\u0430\u044f",bg:"\u0411\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438","bg-BG":"\u0411\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438",bn:"\u09ac\u09be\u0982\u09b2\u09be","bn-IN":"\u09ac\u09be\u0982\u09b2\u09be (\u09ad\u09be\u09b0\u09a4)","bn-BD":"\u09ac\u09be\u0982\u09b2\u09be(\u09ac\u09be\u0982\u09b2\u09be\u09a6\u09c7\u09b6)","bs-BA":"Bosanski",ca:"Catal\u00e0","ca-ES":"Catal\u00e0",cak:"Maya Kaqchikel","ck-US":"\u13e3\u13b3\u13a9 (tsalagi)",
cs:"\u010ce\u0161tina","cs-CZ":"\u010ce\u0161tina",cy:"Cymraeg","cy-GB":"Cymraeg",da:"Dansk","da-DK":"Dansk",de:"Deutsch","de-AT":"Deutsch (\u00d6sterreich)","de-DE":"Deutsch (Deutschland)","de-CH":"Deutsch (Schweiz)",dsb:"Dolnoserb\u0161\u0107ina",el:"\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac","el-GR":"\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac",en:"English","en-GB":"English (UK)","en-AU":"English (Australia)","en-CA":"English (Canada)","en-IE":"English (Ireland)","en-IN":"English (India)",
"en-PI":"English (Pirate)","en-UD":"English (Upside Down)","en-US":"English (US)","en-ZA":"English (South Africa)","en@pirate":"English (Pirate)",eo:"Esperanto","eo-EO":"Esperanto",es:"Espa\u00f1ol","es-AR":"Espa\u00f1ol (Argentine)","es-419":"Espa\u00f1ol (Latinoam\u00e9rica)","es-CL":"Espa\u00f1ol (Chile)","es-CO":"Espa\u00f1ol (Colombia)","es-EC":"Espa\u00f1ol (Ecuador)","es-ES":"Espa\u00f1ol (Espa\u00f1a)","es-LA":"Espa\u00f1ol (Latinoam\u00e9rica)","es-NI":"Espa\u00f1ol (Nicaragua)","es-MX":"Espa\u00f1ol (M\u00e9xico)",
"es-US":"Espa\u00f1ol (Estados Unidos)","es-VE":"Espa\u00f1ol (Venezuela)",et:"eesti keel","et-EE":"Eesti (Estonia)",eu:"Euskara","eu-ES":"Euskara",fa:"\u0641\u0627\u0631\u0633\u06cc","fa-IR":"\u0641\u0627\u0631\u0633\u06cc","fb-LT":"Leet Speak",ff:"Fulah",fi:"Suomi","fi-FI":"Suomi","fo-FO":"F\u00f8royskt",fr:"Fran\u00e7ais","fr-CA":"Fran\u00e7ais (Canada)","fr-FR":"Fran\u00e7ais (France)","fr-BE":"Fran\u00e7ais (Belgique)","fr-CH":"Fran\u00e7ais (Suisse)","fy-NL":"Frysk",ga:"Gaeilge","ga-IE":"Gaeilge (Gaelic)",
gl:"Galego","gl-ES":"Galego","gn-PY":"Ava\u00f1e'\u1ebd","gu-IN":"\u0a97\u0ac1\u0a9c\u0ab0\u0abe\u0aa4\u0ac0","gx-GR":"\u1f19\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ae \u1f00\u03c1\u03c7\u03b1\u03af\u03b1",he:"\u05e2\u05d1\u05e8\u05d9\u05ea\u200f","he-IL":"\u05e2\u05d1\u05e8\u05d9\u05ea\u200f",hi:"\u0939\u093f\u0928\u094d\u0926\u0940","hi-IN":"\u0939\u093f\u0928\u094d\u0926\u0940",hr:"Hrvatski","hr-HR":"Hrvatski",hsb:"Hornjoserb\u0161\u0107ina",ht:"Krey\u00f2l",hu:"Magyar","hu-HU":"Magyar","hy-AM":"\u0540\u0561\u0575\u0565\u0580\u0565\u0576",
id:"Bahasa Indonesia","id-ID":"Bahasa Indonesia",is:"\u00cdslenska","is-IS":"\u00cdslenska (Iceland)",it:"Italiano","it-IT":"Italiano",ja:"\u65e5\u672c\u8a9e","ja-JP":"\u65e5\u672c\u8a9e","jv-ID":"Basa Jawa","ka-GE":"\u10e5\u10d0\u10e0\u10d7\u10e3\u10da\u10d8","kk-KZ":"\u049a\u0430\u0437\u0430\u049b\u0448\u0430",km:"\u1797\u17b6\u179f\u17b6\u1781\u17d2\u1798\u17c2\u179a","km-KH":"\u1797\u17b6\u179f\u17b6\u1781\u17d2\u1798\u17c2\u179a",kab:"Taqbaylit",kn:"\u0c95\u0ca8\u0ccd\u0ca8\u0ca1","kn-IN":"\u0c95\u0ca8\u0ccd\u0ca8\u0ca1 (India)",
ko:"\ud55c\uad6d\uc5b4","ko-KR":"\ud55c\uad6d\uc5b4 (\u97e9\u56fd)",ku:"Kurd\u00ee","ku-TR":"Kurd\u00ee",la:"Latin","la-VA":"Latin",lb:"L\u00ebtzebuergesch","li-NL":"L\u00e8mb\u00f6rgs",lt:"Lietuvi\u0173","lt-LT":"Lietuvi\u0173",lv:"Latvie\u0161u","lv-LV":"Latvie\u0161u",mai:"\u092e\u0948\u0925\u093f\u0932\u0940, \u09ae\u09c8\u09a5\u09bf\u09b2\u09c0","mg-MG":"Malagasy",mk:"\u041c\u0430\u043a\u0435\u0434\u043e\u043d\u0441\u043a\u0438","mk-MK":"\u041c\u0430\u043a\u0435\u0434\u043e\u043d\u0441\u043a\u0438 (\u041c\u0430\u043a\u0435\u0434\u043e\u043d\u0441\u043a\u0438)",
ml:"\u0d2e\u0d32\u0d2f\u0d3e\u0d33\u0d02","ml-IN":"\u0d2e\u0d32\u0d2f\u0d3e\u0d33\u0d02","mn-MN":"\u041c\u043e\u043d\u0433\u043e\u043b",mr:"\u092e\u0930\u093e\u0920\u0940","mr-IN":"\u092e\u0930\u093e\u0920\u0940",ms:"Bahasa Melayu","ms-MY":"Bahasa Melayu",mt:"Malti","mt-MT":"Malti",my:"\u1017\u1019\u102c\u1005\u1000\u102c",nb:"Norsk (bokm\u00e5l)","nb-NO":"Norsk (bokm\u00e5l)",ne:"\u0928\u0947\u092a\u093e\u0932\u0940","ne-NP":"\u0928\u0947\u092a\u093e\u0932\u0940",nl:"Nederlands","nl-BE":"Nederlands (Belgi\u00eb)",
"nl-NL":"Nederlands (Nederland)","nn-NO":"Norsk (nynorsk)",no:"Norsk",oc:"Occitan","or-IN":"\u0b13\u0b21\u0b3c\u0b3f\u0b06",pa:"\u0a2a\u0a70\u0a1c\u0a3e\u0a2c\u0a40","pa-IN":"\u0a2a\u0a70\u0a1c\u0a3e\u0a2c\u0a40 (\u0a2d\u0a3e\u0a30\u0a24 \u0a28\u0a42\u0a70)",pl:"Polski","pl-PL":"Polski","ps-AF":"\u067e\u069a\u062a\u0648",pt:"Portugu\u00eas","pt-BR":"Portugu\u00eas (Brasil)","pt-PT":"Portugu\u00eas (Portugal)","qu-PE":"Qhichwa","rm-CH":"Rumantsch",ro:"Rom\u00e2n\u0103","ro-RO":"Rom\u00e2n\u0103",ru:"\u0420\u0443\u0441\u0441\u043a\u0438\u0439",
"ru-RU":"\u0420\u0443\u0441\u0441\u043a\u0438\u0439","sa-IN":"\u0938\u0902\u0938\u094d\u0915\u0943\u0924\u092e\u094d","se-NO":"Davvis\u00e1megiella","si-LK":"\u0db4\u0dc5\u0dcf\u0dad",sk:"Sloven\u010dina","sk-SK":"Sloven\u010dina (Slovakia)",sl:"Sloven\u0161\u010dina","sl-SI":"Sloven\u0161\u010dina","so-SO":"Soomaaliga",sq:"Shqip","sq-AL":"Shqip",sr:"\u0421\u0440\u043f\u0441\u043a\u0438","sr-RS":"\u0421\u0440\u043f\u0441\u043a\u0438 (Serbia)",su:"Basa Sunda",sv:"Svenska","sv-SE":"Svenska",sw:"Kiswahili",
"sw-KE":"Kiswahili",ta:"\u0ba4\u0bae\u0bbf\u0bb4\u0bcd","ta-IN":"\u0ba4\u0bae\u0bbf\u0bb4\u0bcd",te:"\u0c24\u0c46\u0c32\u0c41\u0c17\u0c41","te-IN":"\u0c24\u0c46\u0c32\u0c41\u0c17\u0c41",tg:"\u0437\u0430\u0431\u043e\u0301\u043d\u0438 \u0442\u043e\u04b7\u0438\u043a\u04e3\u0301","tg-TJ":"\u0442\u043e\u04b7\u0438\u043a\u04e3",th:"\u0e20\u0e32\u0e29\u0e32\u0e44\u0e17\u0e22","th-TH":"\u0e20\u0e32\u0e29\u0e32\u0e44\u0e17\u0e22 (\u0e1b\u0e23\u0e30\u0e40\u0e17\u0e28\u0e44\u0e17\u0e22)",tl:"Filipino","tl-PH":"Filipino",
tlh:"tlhIngan-Hol",tr:"T\u00fcrk\u00e7e","tr-TR":"T\u00fcrk\u00e7e","tt-RU":"\u0442\u0430\u0442\u0430\u0440\u0447\u0430",uk:"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430","uk-UA":"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430",ur:"\u0627\u0631\u062f\u0648","ur-PK":"\u0627\u0631\u062f\u0648",uz:"O'zbek","uz-UZ":"O'zbek",vi:"Ti\u1ebfng Vi\u1ec7t","vi-VN":"Ti\u1ebfng Vi\u1ec7t","xh-ZA":"isiXhosa",yi:"\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9","yi-DE":"\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9 (German)",
zh:"\u4e2d\u6587","zh-HANS":"\u4e2d\u6587\u7b80\u4f53","zh-HANT":"\u4e2d\u6587\u7e41\u9ad4","zh-CN":"\u4e2d\u6587\uff08\u4e2d\u56fd\uff09","zh-HK":"\u4e2d\u6587\uff08\u9999\u6e2f\uff09","zh-SG":"\u4e2d\u6587\uff08\u65b0\u52a0\u5761\uff09","zh-TW":"\u4e2d\u6587\uff08\u53f0\u7063\uff09","zu-ZA":"isiZulu"},fp=u(Object.keys(ep)),gp=fp.next();!gp.done;gp=fp.next()){var hp=gp.value;ep[hp.toLowerCase()]=ep[hp]};function ip(a,b){if(a.lineBreak)return"\n";if(a.nestedCues.length)return a.nestedCues.map(function(g){return ip(g,a)}).join("");if(!a.payload)return a.payload;var c=[],d=a.fontWeight>=Re,e=a.fontStyle==Se,f=a.textDecoration.includes(Te);d&&c.push(["b"]);e&&c.push(["i"]);f&&c.push(["u"]);e=a.color;e==""&&b&&(e=b.color);d="";(e=jp(e))&&(d+="."+e);e=a.backgroundColor;e==""&&b&&(e=b.backgroundColor);(b=jp(e))&&(d+=".bg_"+b);d&&c.push(["c",d]);return c.reduceRight(function(g,h){var k=u(h);h=k.next().value;
k=k.next().value;return"<"+h+(k===void 0?"":k)+">"+g+"</"+h+">"},a.payload)}
function jp(a){a=a.toLowerCase();var b=a.replace(/\s/g,"").match(/^rgba?\((\d+),(\d+),(\d+),?([^,\s)]+)?/i);b?a="#"+(parseInt(b[1],10)|256).toString(16).slice(1)+(parseInt(b[2],10)|256).toString(16).slice(1)+(parseInt(b[3],10)|256).toString(16).slice(1):a.startsWith("#")&&a.length>7&&(a=a.slice(0,7));switch(a){case "white":case "#fff":case "#ffffff":return"white";case "lime":case "#0f0":case "#00ff00":return"lime";case "cyan":case "#0ff":case "#00ffff":return"cyan";case "red":case "#f00":case "#ff0000":return"red";
case "yellow":case "#ff0":case "#ffff00":return"yellow";case "magenta":case "#f0f":case "#ff00ff":return"magenta";case "blue":case "#00f":case "#0000ff":return"blue";case "black":case "#000":case "#000000":return"black"}return null}function kp(a,b){var c=[];a=u(lp(a));for(var d=a.next();!d.done;d=a.next())if(d=d.value,d.isContainer)c.push.apply(c,x(kp(d.nestedCues,d)));else{var e=d.clone();e.nestedCues=[];e.payload=ip(d,b);c.push(e)}return c}
function lp(a){var b=[];a=u(a);for(var c=a.next(),d={};!c.done;d={Rg:void 0},c=a.next())d.Rg=c.value,b.some(function(e){return function(f){return Fe(e.Rg,f)}}(d))||b.push(d.Rg);return b}
function mp(a){function b(d){for(var e=5381,f=d.length;f;)e=e*33^d.charCodeAt(--f);return(e>>>0).toString()}if(a.startTime>=a.endTime)return null;var c=new VTTCue(a.startTime,a.endTime,a.payload);c.id=b(a.startTime.toString())+b(a.endTime.toString())+b(a.payload);c.lineAlign=a.lineAlign;c.positionAlign=a.positionAlign;a.size&&(c.size=a.size);try{c.align=a.textAlign}catch(d){}a.textAlign=="center"&&c.align!="center"&&(c.align="middle");a.writingMode=="vertical-lr"?c.vertical="lr":a.writingMode=="vertical-rl"&&
(c.vertical="rl");a.lineInterpretation==1&&(c.snapToLines=!1);a.line!=null&&(c.line=a.line);a.position!=null&&(c.position=a.position);return c}
function np(a,b){var c=kp(b),d=[];b=a.cues?Array.from(a.cues):[];c=u(c);for(var e=c.next(),f={};!e.done;f={Ld:void 0},e=c.next())f.Ld=e.value,!b.some(function(g){return function(h){return h.startTime==g.Ld.startTime&&h.endTime==g.Ld.endTime&&h.text==g.Ld.payload?!0:!1}}(f))&&f.Ld.payload&&(e=mp(f.Ld))&&d.push(e);b=d.slice().sort(function(g,h){return g.startTime!=h.startTime?g.startTime-h.startTime:g.endTime!=h.endTime?g.endTime-h.startTime:"line"in VTTCue.prototype?d.indexOf(h)-d.indexOf(g):d.indexOf(g)-
d.indexOf(h)});b=u(b);for(c=b.next();!c.done;c=b.next())a.addCue(c.value)}function op(a,b){var c=!1;a.mode==="disabled"&&(c=!0,a.mode="hidden");for(var d=0;d<a.cues.length;){var e=a.cues[d];b(e)?a.removeCue(e):d++}c&&(a.mode="disabled")};function pp(a){var b=this;this.i=a;this.l=new Wc;this.j=null;this.h=new Map;this.g=-1;this.A=!1;this.u=null;this.D=function(){b.l.Ea(b.i,"textchanged",b.m);b.l.Ea(b.j.textTracks,"change",b.C);for(var c=u(b.h.values()),d=c.next();!d.done;d=c.next())d.value.remove();b.h.clear();b.g=-1;b.j=null};this.m=function(){var c=new Map,d=b.i.Bc();d=u(d);for(var e=d.next();!e.done;e=d.next()){e=e.value;if(b.h.has(e.id)){var f=b.h.get(e.id);e.active||f.track.mode==="disabled"||(f.track.mode="disabled");b.h.delete(e.id)}else{f=
b.j.ownerDocument.createElement("track");f.kind=qp(e);var g=f,h=void 0;if(e.label)h=e.label;else if(e.language)if(e.language in ep)h=ep[e.language];else{var k=Hc(e.language);k in ep&&(h=ep[k]+" ("+e.language+")")}h||(h=e.originalTextId,e.language&&e.language!==e.originalTextId&&(h+=" ("+e.language+")"));g.label=h;e.language in ep&&(f.srclang=e.language);f.src="data:,WEBVTT";f.track.mode="disabled";b.j.appendChild(f)}c.set(e.id,f);e.active&&(b.g=e.id)}d=u(b.h.values());for(e=d.next();!e.done;e=d.next())e.value.remove();
b.g>-1&&(c.has(b.g)?(d=c.get(b.g).track,d.mode==="disabled"&&(d.mode=b.A?"showing":"hidden")):b.g=-1);b.h=c};this.C=function(){if(!b.u){var c=b.j;b.u=(new Gf(function(){b.u=null;if(b.j===c){var d=-1,e=!1;if(b.h.has(b.g)){var f=b.h.get(b.g);f.track.mode==="showing"?(d=b.g,e=!0):f.track.mode==="hidden"&&(d=b.g)}if(!e)for(e=u(b.h),f=e.next();!f.done;f=e.next()){var g=u(f.value);f=g.next().value;g=g.next().value;if(g.track.mode==="showing"){d=f;break}else d<0&&g.track.mode==="hidden"&&(d=f)}e=u(b.h);
for(f=e.next();!f.done;f=e.next())g=u(f.value),f=g.next().value,g=g.next().value,f!==d&&g.track.mode!=="disabled"&&(g.track.mode="disabled");b.g!==d&&(b.g=d,d>-1&&b.i.hg({id:d}));b.i.$d(d>-1&&b.h.get(d).track.mode==="showing")}})).Y(0)}};this.l.o(a,"loaded",function(){return b.enableTextDisplayer()});this.enableTextDisplayer()}p=pp.prototype;p.configure=function(){};
p.remove=function(a,b){if(this.i)this.h.has(this.g)&&op(this.h.get(this.g).track,function(c){return c.startTime<b&&c.endTime>a});else return!1;return!0};p.append=function(a){this.h.has(this.g)&&np(this.h.get(this.g).track,a)};p.destroy=function(){this.i&&(this.j&&this.D(),this.i=null);this.l&&(this.l.release(),this.l=null);return Promise.resolve()};p.isTextVisible=function(){return this.A};
p.setTextVisibility=function(a){this.A=a;if(this.h.has(this.g)){var b=this.h.get(this.g).track;b.mode!=="disabled"&&(a=a?"showing":"hidden",b.mode!==a&&(b.mode=a))}else if(this.i&&this.i.l===3)if(b=Array.from(this.i.h.textTracks).filter(function(d){return["captions","subtitles","forced"].includes(d.kind)}),a){a=null;b=u(b);for(var c=b.next();!c.done;c=b.next())if(c=c.value,c.mode==="showing"){a=null;break}else a||c.mode!=="hidden"||(a=c);a&&(a.mode="showing")}else for(a=u(b),b=a.next();!b.done;b=
a.next())b=b.value,b.mode==="showing"&&(b.mode="hidden")};p.setTextLanguage=function(){};p.enableTextDisplayer=function(){!this.j&&this.i&&this.i.l===2&&(this.j=this.i.h,this.l.ua(this.i,"unloading",this.D),this.l.o(this.i,"textchanged",this.m),this.l.o(this.j.textTracks,"change",this.C),this.m())};
function qp(a){var b=Tb();return a.forced&&b.Ja()==="WEBKIT"?"forced":a.kind==="caption"||a.roles&&a.roles.some(function(c){return c.includes("transcribes-spoken-dialog")})&&a.roles.some(function(c){return c.includes("describes-music-and-sound")})?"captions":"subtitles"}S("shaka.text.NativeTextDisplayer",pp);pp.prototype.enableTextDisplayer=pp.prototype.enableTextDisplayer;pp.prototype.setTextLanguage=pp.prototype.setTextLanguage;pp.prototype.setTextVisibility=pp.prototype.setTextVisibility;
pp.prototype.isTextVisible=pp.prototype.isTextVisible;pp.prototype.destroy=pp.prototype.destroy;pp.prototype.append=pp.prototype.append;pp.prototype.remove=pp.prototype.remove;pp.prototype.configure=pp.prototype.configure;function rp(a,b){bd("SimpleTextDisplayer","Please migrate to NativeTextDisplayer");this.h=a;this.i=b;this.g=null;a=u(Array.from(this.h.textTracks));for(b=a.next();!b.done;b=a.next())b=b.value,b.kind!=="metadata"&&b.kind!=="chapters"&&(b.mode="disabled",b.label==this.i&&(this.g=b));this.g&&(this.g.mode="hidden")}p=rp.prototype;p.configure=function(){};p.remove=function(a,b){if(!this.g)return!1;op(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
p.append=function(a){this.g&&np(this.g,a)};p.destroy=function(){this.g&&(op(this.g,function(){return!0}),this.g.mode="disabled");this.g=this.h=null;return Promise.resolve()};p.isTextVisible=function(){return this.g?this.g.mode=="showing":!1};p.setTextVisibility=function(a){a&&!this.g&&sp(this);this.g&&(this.g.mode=a?"showing":"hidden")};p.setTextLanguage=function(){};p.enableTextDisplayer=function(){sp(this)};function sp(a){a.h&&!a.g&&(a.g=a.h.addTextTrack("subtitles",a.i),a.g.mode="hidden")}
S("shaka.text.SimpleTextDisplayer",rp);rp.prototype.enableTextDisplayer=rp.prototype.enableTextDisplayer;rp.prototype.setTextLanguage=rp.prototype.setTextLanguage;rp.prototype.setTextVisibility=rp.prototype.setTextVisibility;rp.prototype.isTextVisible=rp.prototype.isTextVisible;rp.prototype.destroy=rp.prototype.destroy;rp.prototype.append=rp.prototype.append;rp.prototype.remove=rp.prototype.remove;rp.prototype.configure=rp.prototype.configure;function tp(){}p=tp.prototype;p.configure=function(){};p.remove=function(){};p.append=function(){};p.destroy=function(){};p.isTextVisible=function(){return!1};p.setTextVisibility=function(){};p.setTextLanguage=function(){};p.enableTextDisplayer=function(){};S("shaka.text.StubTextDisplayer",tp);tp.prototype.enableTextDisplayer=tp.prototype.enableTextDisplayer;tp.prototype.setTextLanguage=tp.prototype.setTextLanguage;tp.prototype.setTextVisibility=tp.prototype.setTextVisibility;
tp.prototype.isTextVisible=tp.prototype.isTextVisible;tp.prototype.destroy=tp.prototype.destroy;tp.prototype.append=tp.prototype.append;tp.prototype.remove=tp.prototype.remove;tp.prototype.configure=tp.prototype.configure;function up(a,b){var c=this;this.m=!1;this.h=[];this.j=a;this.u=b;this.D=this.A=null;this.g=W("div");this.g.classList.add("shaka-text-container");this.g.style.textAlign="center";this.g.style.display="flex";this.g.style.flexDirection="column";this.g.style.alignItems="center";this.g.style.justifyContent="flex-end";this.C=new Gf(function(){c.j.paused||vp(c)});wp(this);this.l=new Map;this.i=new Wc;this.i.o(document,"fullscreenchange",function(){vp(c,!0)});this.i.o(this.j,"seeking",function(){vp(c,!0)});
this.i.o(this.j,"ratechange",function(){wp(c)});this.i.o(this.j,"resize",function(){var d=c.j,e=d.videoWidth;d=d.videoHeight;e&&d?c.A=e/d:c.A=null});this.F=null;"ResizeObserver"in window&&(this.F=new ResizeObserver(function(){vp(c,!0)}),this.F.observe(this.g));this.G=new Map}p=up.prototype;p.configure=function(a){this.D=a;wp(this);vp(this,!0)};
p.append=function(a){var b=[].concat(x(this.h));a=u(lp(a));for(var c=a.next(),d={};!c.done;d={Sg:void 0},c=a.next())d.Sg=c.value,b.some(function(e){return function(f){return Fe(f,e.Sg)}}(d))||this.h.push(d.Sg);this.h.length&&wp(this);vp(this)};
p.destroy=function(){if(!this.g)return Promise.resolve();this.g.parentElement&&this.u.removeChild(this.g);this.g=null;this.m=!1;this.h=[];this.C&&(this.C.stop(),this.C=null);this.l.clear();this.i&&(this.i.release(),this.i=null);this.F&&(this.F.disconnect(),this.F=null);return Promise.resolve()};p.remove=function(a,b){if(!this.g)return!1;var c=this.h.length;this.h=this.h.filter(function(d){return d.startTime<a||d.endTime>=b});vp(this,c>this.h.length);this.h.length||wp(this);return!0};
p.isTextVisible=function(){return this.m};p.setTextVisibility=function(a){(this.m=a)?(this.g.parentElement||this.u.appendChild(this.g),vp(this,!0)):this.g.parentElement&&this.u.removeChild(this.g)};p.setTextLanguage=function(a){a&&a!="und"?this.g.setAttribute("lang",a):this.g.setAttribute("lang","")};p.enableTextDisplayer=function(){};function wp(a){a.C&&(a.h.length?a.C.xa((a.D?a.D.captionsUpdatePeriod:.25)/Math.max(1,Math.abs(a.j.playbackRate))):a.C.stop())}
function xp(a,b){for(;b!=null;){if(b==a.g)return!0;b=b.parentElement}return!1}
function yp(a,b,c,d,e){var f=!1,g=[],h=[];b=u(b);for(var k=b.next();!k.done;k=b.next()){k=k.value;e.push(k);var l=a.l.get(k),m=k.startTime<=d&&k.endTime>d,n=l?l.pk:null;l&&(g.push(l.Tg),l.rd&&g.push(l.rd),m||(f=!0,a.l.delete(k),l=null));m&&(h.push(k),l?xp(a,n)||(f=!0):(zp(a,k,e),l=a.l.get(k),n=l.pk,f=!0));k.nestedCues.length>0&&n&&yp(a,k.nestedCues,n,d,e);e.pop()}if(f){d=u(g);for(e=d.next();!e.done;e=d.next())e=e.value,e.parentElement&&e.parentElement.removeChild(e);h.sort(function(q,r){return q.startTime!=
r.startTime?q.startTime-r.startTime:q.endTime-r.endTime});h=u(h);for(d=h.next();!d.done;d=h.next())d=a.l.get(d.value),d.rd?(d.rd.contains(c)&&d.rd.removeChild(c),c.appendChild(d.rd),d.rd.appendChild(d.Tg)):c.appendChild(d.Tg)}}function vp(a,b){if(a.g){var c=a.j.currentTime;if(!a.m||(b===void 0?0:b)){b=u(a.G.values());for(var d=b.next();!d.done;d=b.next())bk(d.value);bk(a.g);a.l.clear();a.G.clear()}a.m&&yp(a,a.h,a.g,c,[])}}
function zp(a,b,c){var d=c.length>1,e=d?"span":"div";b.lineBreak&&(e="br");b.rubyTag&&(e=b.rubyTag);d=!d&&b.nestedCues.length>0;var f=W(e);e!="br"&&Ap(a,f,b,c,d);c=null;if(b.region&&b.region.id){var g=b.region,h=a.A===4/3?2.5:1.9;c=g.id+"_"+g.width+"x"+g.height+(g.heightUnits==yd?"%":"px")+"-"+g.viewportAnchorX+"x"+g.viewportAnchorY+(g.viewportAnchorUnits==yd?"%":"px");if(a.G.has(c))c=a.G.get(c);else{e=W("span");var k=g.heightUnits==yd?"%":"px",l=g.widthUnits==yd?"%":"px",m=g.viewportAnchorUnits==
yd?"%":"px";e.id="shaka-text-region---"+c;e.classList.add("shaka-text-region");e.style.position="absolute";var n=g.height,q=g.width;g.heightUnits===2&&(n=g.height*5.33,k="%");g.widthUnits===2&&(q=g.width*h,l="%");e.style.height=n+k;e.style.width=q+l;g.viewportAnchorUnits===2?(h=g.viewportAnchorY/75*100,k=g.viewportAnchorX/(a.A===4/3?160:210)*100,h-=g.regionAnchorY*n/100,k-=g.regionAnchorX*q/100,e.style.top=h+"%",e.style.left=k+"%"):(e.style.top=g.viewportAnchorY-g.regionAnchorY*n/100+m,e.style.left=
g.viewportAnchorX-g.regionAnchorX*q/100+m);g.heightUnits!==0&&g.widthUnits!==0&&g.viewportAnchorUnits!==0&&(g=Math.max(0,Math.min(100-(parseInt(e.style.width.slice(0,-1),10)||0),parseInt(e.style.left.slice(0,-1),10)||0)),e.style.top=Math.max(0,Math.min(100-(parseInt(e.style.height.slice(0,-1),10)||0),parseInt(e.style.top.slice(0,-1),10)||0))+"%",e.style.left=g+"%");e.style.display="flex";e.style.flexDirection="column";e.style.alignItems="center";e.style.justifyContent=b.displayAlign=="before"?"flex-start":
b.displayAlign=="center"?"center":"flex-end";a.G.set(c,e);c=e}}e=f;d&&(e=W("span"),e.classList.add("shaka-text-wrapper"),e.style.backgroundColor=b.backgroundColor,e.style.lineHeight="normal",f.appendChild(e));a.l.set(b,{Tg:f,pk:e,rd:c})}function Bp(a){var b=a.direction,c=a.positionAlign;a=a.textAlign;return c!==ve?c:a==="left"||a==="start"&&b===xe||a==="end"&&b==="rtl"?"line-left":a==="right"||a==="start"&&b==="rtl"||a==="end"&&b===xe?"line-right":"center"}
function Ap(a,b,c,d,e){var f=b.style,g=c.nestedCues.length==0,h=d.length>1;f.whiteSpace="pre-wrap";var k=c.payload.replace(/\s+$/g,function(m){return"\u00a0".repeat(m.length)});f.webkitTextStrokeColor=c.textStrokeColor;f.webkitTextStrokeWidth=c.textStrokeWidth;f.color=c.color;f.direction=c.direction;f.opacity=c.opacity;f.paddingLeft=Cp(c.linePadding,c,a.u);f.paddingRight=Cp(c.linePadding,c,a.u);f.textCombineUpright=c.textCombineUpright;f.textShadow=c.textShadow;if(c.backgroundImage)f.backgroundImage=
"url('"+c.backgroundImage+"')",f.backgroundRepeat="no-repeat",f.backgroundSize="contain",f.backgroundPosition="center",c.backgroundColor&&(f.backgroundColor=c.backgroundColor),f.width="100%",f.height="100%";else{if(c.nestedCues.length)var l=b;else l=W("span"),b.appendChild(l);c.border&&(l.style.border=c.border);e||((b=Dp(d,function(m){return m.backgroundColor}))?l.style.backgroundColor=b:k&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)"));k&&(l.setAttribute("translate","no"),l.textContent=k)}if(h&&
!d[d.length-1].isContainer)f.display="inline";else{f.display="flex";f.flexDirection="column";f.alignItems="center";if(c.textAlign=="left"||c.textAlign=="start")f.width="100%",f.alignItems="start";else if(c.textAlign=="right"||c.textAlign=="end")f.width="100%",f.alignItems="end";f.justifyContent=c.displayAlign=="before"?"flex-start":c.displayAlign=="center"?"center":"flex-end"}g||(f.margin="0");f.fontFamily=c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;
d=a.D?a.D.fontScaleFactor:1;if(d!==1||c.fontSize)f.fontSize=Cp(c.fontSize||"1em",c,a.u,d);d=c.line;d!=null&&(g=c.lineInterpretation,g==ze&&(g=1,h=16,a.A&&a.A<1&&(h=32),d=d<0?100+d/h*100:d/h*100),g==1&&(f.position="absolute",c.writingMode==ye?(f.width="100%",c.lineAlign==Ae?f.top=d+"%":c.lineAlign=="end"&&(f.bottom=100-d+"%")):c.writingMode=="vertical-lr"?(f.height="100%",c.lineAlign==Ae?f.left=d+"%":c.lineAlign=="end"&&(f.right=100-d+"%")):(f.height="100%",c.lineAlign==Ae?f.right=d+"%":c.lineAlign==
"end"&&(f.left=100-d+"%"))));f.lineHeight=c.lineHeight;a=Bp(c);a=="line-left"?(f.cssFloat="left",c.position!==null&&(f.position="absolute",c.writingMode==ye?(f.left=c.position+"%",f.width="auto"):f.top=c.position+"%")):a=="line-right"?(f.cssFloat="right",c.position!==null&&(f.position="absolute",c.writingMode==ye?(f.right=100-c.position+"%",f.width="auto"):f.bottom=c.position+"%")):c.position!==null&&c.position!=50&&(f.position="absolute",c.writingMode==ye?(f.left=c.position+"%",f.width="auto"):f.top=
c.position+"%",c.size&&(f.transform="translateX(-50%)"));f.textAlign=c.textAlign;f.textDecoration=c.textDecoration.join(" ");f.writingMode=c.writingMode;"writingMode"in document.documentElement.style&&f.writingMode==c.writingMode||(f.webkitWritingMode=c.writingMode);c.size&&(c.writingMode==ye?f.width=c.size+"%":f.height=c.size+"%")}
function Cp(a,b,c,d){d=d===void 0?1:d;var e=(e=(new RegExp(/(\d*\.?\d+)([a-z]+|%+)/)).exec(a))?{value:Number(e[1]),unit:e[2]}:null;if(!e)return a;a=e.unit;d*=e.value;switch(a){case "%":return d/100*c.clientHeight/b.cellResolution.rows+"px";case "c":return c.clientHeight*d/b.cellResolution.rows+"px";default:return d+a}}function Dp(a,b){for(var c=a.length-1;c>=0;c--){var d=b(a[c]);if(d||d===0)return d}return null}S("shaka.text.UITextDisplayer",up);up.prototype.enableTextDisplayer=up.prototype.enableTextDisplayer;
up.prototype.setTextLanguage=up.prototype.setTextLanguage;up.prototype.setTextVisibility=up.prototype.setTextVisibility;up.prototype.isTextVisible=up.prototype.isTextVisible;up.prototype.remove=up.prototype.remove;up.prototype.destroy=up.prototype.destroy;up.prototype.append=up.prototype.append;up.prototype.configure=up.prototype.configure;function Ep(a,b){function c(f){for(var g=f,h=u(b),k=h.next();!k.done;k=h.next())k=k.value,k.end&&k.start<f&&(g+=k.end-k.start);f=Math.floor(g/3600);h=Math.floor(g/60%60);k=Math.floor(g%60);g=Math.floor(g*1E3%1E3);return(f<10?"0":"")+f+":"+(h<10?"0":"")+h+":"+(k<10?"0":"")+k+"."+(g<100?g<10?"00":"0":"")+g}var d=kp(a);a="WEBVTT\n\n";d=u(d);for(var e=d.next();!e.done;e=d.next())e=e.value,a+=c(e.startTime)+" --\x3e "+c(e.endTime)+function(f){var g=[];switch(f.textAlign){case "left":g.push("align:left");
break;case "right":g.push("align:right");break;case we:g.push("align:middle");break;case "start":g.push("align:start");break;case "end":g.push("align:end")}switch(f.writingMode){case "vertical-lr":g.push("vertical:lr");break;case "vertical-rl":g.push("vertical:rl")}return g.length?" "+g.join(" "):""}(e)+"\n",a+=e.payload+"\n\n";return a}S("shaka.text.WebVttGenerator",function(){});function Fp(a,b){this.g=b;this.j=a;this.m=new Map;this.l=void 0;this.F=!1;this.J=!0;this.A=this.I=!1;this.D=this.C=void 0;this.H=0;this.K={request:!1,response:!1,event:!1};this.u={};this.i=new Wc;this.G=[];this.h=null}Fp.prototype.setMediaElement=function(a){this.h=a;Gp(this)};Fp.prototype.configure=function(a){this.g=a;Hp(this)};function Ip(a){a.m.clear();a.F=!1;a.J=!0;a.I=!1;a.A=!1;a.C=0;a.D=0;a.H=0;a.K={request:!1,response:!1,event:!1};Jp(a);a.u={};a.h=null;a.i.Sa()}
function Kp(a,b){a.A=b;a.A?a.l==Lp?a.l=Mp:a.l==Np&&(a.l=Op):a.l==Mp?a.l=Lp:a.l==Op&&(a.l=Np)}function Pp(a,b){if(a.g&&a.g.enabled&&(Qp(a,"ps",{ud:"d"}),a.h&&a.h.autoplay)){var c=a.h.play();c&&c.then(function(){a.H=b}).catch(function(){a.H=0})}}
function Rp(a,b,c){try{if(!a.g.enabled)return b;var d=Sp(a);a:{switch(c.toLowerCase()){case "audio/mp4":case "audio/webm":case "audio/ogg":case "audio/mpeg":case "audio/aac":case "audio/flac":case "audio/wav":var e=Tp;break a;case "video/webm":case "video/mp4":case "video/mpeg":case "video/mp2t":e=Up;break a;case "application/x-mpegurl":case "application/vnd.apple.mpegurl":case "application/dash+xml":case "video/vnd.mpeg.dash.mpd":case "application/vnd.ms-sstr+xml":e=Vp;break a}e=void 0}d.ot=e;d.su=
!0;var f=Wp(d);return Xp(b,f)}catch(g){return cb("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}
function Gp(a){a.i.o(a.h,"playing",function(){a.D||(a.D=Date.now());Qp(a,"ps",{ud:"p"})});a.i.o(a.h,"volumechange",function(){Qp(a,a.h.muted?"m":"um")});a.i.o(a.h,"play",function(){a.C||(a.C=Date.now(),Qp(a,"ps",{ud:"s"}))});a.i.o(a.h,"pause",function(){Qp(a,"ps",{ud:"a"})});a.i.o(a.j,"buffering",function(){Qp(a,"ps",{ud:"w"})});a.i.o(a.h,"seeking",function(){return Qp(a,"ps",{ud:"k"})});a.i.o(document,"fullscreenchange",function(){Qp(a,document.fullscreenElement?"pe":"pc")});var b=a.h;(b.webkitPresentationMode||
b.webkitSupportsFullscreen)&&a.i.o(b,"webkitpresentationmodechanged",function(){b.webkitPresentationMode?Qp(a,b.webkitPresentationMode!=="inline"?"pe":"pc"):b.webkitSupportsFullscreen&&Qp(a,b.webkitDisplayingFullscreen?"pe":"pc")});a.i.o(a.h,"enterpictureinpicture",function(){Qp(a,"pe")});a.i.o(a.h,"leavepictureinpicture",function(){Qp(a,"pc")});"documentPictureInPicture"in window&&a.i.o(window.documentPictureInPicture,"enter",function(c){Qp(a,"pe");a.i.ua(c.window,"pagehide",function(){Qp(a,"pc")})});
a.i.o(document,"visibilitychange",function(){document.hidden?Qp(a,"b",{bg:!0}):Qp(a,"b")});a.i.o(a.j,"complete",function(){Qp(a,"ps",{ud:"e"})})}function Hp(a){Jp(a);var b=Yp(a);b=u(b);for(var c=b.next();!c.done;c=b.next())if(c=c.value.timeInterval,c===void 0&&(c=Zp),c>=1){var d=new Gf(function(){return Qp(a,$p)});d.xa(c);a.G.push(d)}}function Jp(a){if(a.G)for(var b=u(a.G),c=b.next();!c.done;c=b.next())c.value.stop();a.G=[]}
function Yp(a){return(a=a.g.targets)?a.filter(function(b){return b.mode===aq&&b.enabled}):[]}function bq(a){return(a=a.g.targets)?a.filter(function(b){return b.mode===cq&&b.enabled===!0}):[]}function Sp(a){a.g.sessionId||(a.g.sessionId=window.crypto.randomUUID());return{v:a.g.version,sf:a.l,sid:a.g.sessionId,cid:a.g.contentId,mtp:a.j.getBandwidthEstimate()/1E3}}
function Qp(a,b,c){c=c===void 0?{}:c;b=Object.assign({e:b,ts:Date.now()},c);b=dq(a,b,aq);c=a.g.targets;if(!(a.g.version<eq)&&c){var d=Yp(a);c=Array.from(new Set([].concat(x(tq),x(uq))));d=u(d);for(var e=d.next();!e.done;e=d.next()){e=e.value;var f=vq(e.includeKeys||[],c);f.includes(wq)||f.push(wq);f=xq(b,f);var g=e.events||[],h=f.e,k=f.sta;h&&(!yq.includes(h)||!(h!=="ps"||k&&zq.includes(k))||g&&g.length>0&&!g.includes(h))||Aq(a,f,e)}}}
function Bq(a,b,c){if(a.g.enabled){c=dq(a,c,Cq);var d=Dq({mode:Cq,useHeaders:a.g.useHeaders,includeKeys:a.g.includeKeys||[]});a.u[d]||(a.u[d]={request:1,response:1});c.sn=a.u[d].request++;d=a.g.includeKeys||[];var e=a.g.version==eq?Array.from(new Set([].concat(x(tq),x(Eq)))):Fq;d=vq(d,e);c=xq(c,d);Gq(a,c,b,a.g.useHeaders)}}
function Aq(a,b,c,d){var e=Ug(),f=c.url;if(c.useHeaders){b=Hq(b);if(!Object.keys(b).length)return;d&&Object.assign(d.headers,b);d=jh([f],e);Object.assign(d.headers,b)}else{b=Wp(b);if(!b)return;f=Xp(f,b);d&&(d.uri=f);d=jh([f],e)}a.j.Xb().request(9,d)}function Gq(a,b,c,d){if(d){b=Hq(b);if(!Object.keys(b).length)return;Object.assign(c.headers,b)}else{var e=Wp(b);if(!e)return;c.uris=c.uris.map(function(f){return Xp(f,e)})}bq(a).length>0||!a.m.has(c)||a.m.delete(c)}
function vq(a,b){if(!a||a.length===0)return b;for(var c=u(a),d=c.next();!d.done;d=c.next())b.includes(d.value);return a=a.filter(function(e){return b.includes(e)})}function xq(a,b){return Object.keys(a).reduce(function(c,d){b.includes(d)&&(c[d]=a[d]);return c},{})}function Iq(a){if(a.type===0)return Jq;if(a=a.stream){var b=a.type;if(b=="video")return a.codecs&&a.codecs.includes(",")?Up:Kq;if(b=="audio")return Tp;if(b=="text")return a.mimeType==="application/mp4"?Lq:Mq}}
function Dq(a){var b=Object.keys(a).sort().reduce(function(c,d){d!=="enabled"&&(c[d]=a[d]);return c},{});return JSON.stringify(b)}function Nq(a,b){b=a.j.Rc()[b];if(!b.length)return NaN;var c=a.h?a.h.currentTime:0;return(a=b.find(function(d){return d.start<=c&&d.end>=c}))?(a.end-c)*1E3:NaN}function Oq(a,b){b=a.j.Rc()[b];if(!b.length)return 0;var c=a.h?a.h.currentTime:0;return(a=b.find(function(d){return d.start<=c&&d.end>=c}))?(a.end-c)*1E3:0}
function Pq(a,b){var c=a.j.Qb();if(!c.length)return NaN;a=c[0];c=u(c);for(var d=c.next();!d.done;d=c.next())d=d.value,d.type==="variant"&&d.bandwidth>a.bandwidth&&(a=d);switch(b){case Kq:return a.videoBandwidth||NaN;case Tp:return a.audioBandwidth||NaN;default:return a.bandwidth}}
function Qq(a,b,c){var d=b.segment,e=0;d&&(e=d.endTime-d.startTime);e={d:e*1E3,st:a.j.U()?Rq:Sq};e.ot=Iq(b);var f=e.ot===Kq||e.ot===Tp||e.ot===Up||e.ot===Lq;if(b=b.stream){var g=a.j.Za();if(f&&(e.bl=Nq(a,b.type),e.ot!==Lq)){var h=Oq(a,b.type);e.dl=g?h/Math.abs(g):h}b.bandwidth&&(e.br=b.bandwidth/1E3);if(b.segmentIndex&&d){if((g=b.segmentIndex.hc(d.endTime,!0,g<0))&&(g=g.next().value)&&g!=d){if(c&&!Vc(d.S(),g.S())){var k=g.S()[0];h=new URL(k);var l=new URL(c);if(h.origin!==l.origin)c=k;else{c=h.pathname.split("/").slice(1);
k=l.pathname.split("/").slice(1,-1);l=Math.min(c.length,k.length);for(var m=0;m<l&&c[m]===k[m];m++)c.shift(),k.shift();for(;k.length;)k.shift(),c.unshift("..");c=c.join("/")+h.search+h.hash}e.nor=c}!g.startByte&&!g.endByte||d.startByte==g.startByte&&d.endByte==g.endByte||(c=g.startByte+"-",g.endByte&&(c+=g.endByte),e.nrr=c)}g=a.j.Za()||1;c=Oq(a,b.type)||500;d=(b=b.bandwidth)?b*(d.endTime-d.startTime)/1E3/(c/g/1E3)*a.g.rtpSafetyFactor:NaN;isNaN(d)||(e.rtp=d)}}f&&e.ot!==Lq&&(e.tb=Pq(a,e.ot)/1E3);return e}
function dq(a,b,c){Object.assign(b,Sp(a));b.pr=a.j.Za();var d=b.ot===Kq||b.ot===Up;a.I&&d&&(b.bs=!0,b.su=!0,a.I=!1);b.su==null&&(b.su=a.J);a.j.U()&&(d=Tq(a.j),b.ltc=d||void 0);document.hidden&&(b.bg=!0);d=a.D&&a.C?a.D-(a.H||a.C):void 0;d==void 0||a.K[c]||(b.msd=d,a.K[c]=!0);return b}
function Wp(a){function b(n){return c(n/100)*100}function c(n){return Math.round(n)}function d(n){return!Number.isNaN(n)&&n!=null&&n!==""&&n!==!1}var e=[],f={br:c,d:c,bl:b,dl:b,mtp:b,nor:function(n){return encodeURIComponent(n)},rtp:b,tb:c,ttfb:c,ttlb:c},g=Object.keys(a||{}).sort();g=u(g);for(var h=g.next();!h.done;h=g.next()){h=h.value;var k=a[h];if(d(k)&&(h!=="v"||k!==1)&&(h!="pr"||k!==1)){var l=f[h];l&&(k=l(k));l=typeof k;var m=void 0;m=l==="string"&&h!=="ot"&&h!=="sf"&&h!=="st"?h+"="+JSON.stringify(k):
l==="boolean"?h:l==="symbol"?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}
function Hq(a){var b=Object.keys(a),c={},d=["Object","Request","Session","Status"],e=[{},{},{},{}],f={br:0,d:0,ot:0,tb:0,url:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,ltc:1,ttfb:1,ttlb:1,ts:1,rc:1,cmsdd:1,cmsds:1,sn:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,msd:2,bs:3,rtp:3,bg:3};b=u(b);for(var g=b.next();!g.done;g=b.next())g=g.value,e[f[g]!=null?f[g]:1][g]=a[g];for(a=0;a<e.length;a++)(f=Wp(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
function Xp(a,b){if(!b||a.includes("offline:"))return a;a=new tb(a);a.g.set("CMCD",b);return a.toString()}var Vp="m",Tp="a",Kq="v",Up="av",Jq="i",Mq="c",Lq="tt",eq=2,Sq="v",Rq="l",Lp="d",Mp="ld",Np="h",Op="lh";S("shaka.util.CmcdManager.StreamingFormat",{DASH:Lp,pn:Mp,HLS:Np,qn:Op,Fn:"s",OTHER:"o"});
var Fq="br bl bs cid d dl mtp nor nrr ot pr rtp sf sid st su tb v".split(" "),tq="br ab bl tbl bs cdn cid ltc mtp pr sf sid bg sta st ts tpb tb lb tab lab pt ec msd v sn".split(" "),Eq="ab bl tbl bs cdn cid d dl ltc mtp nor ot pr rtp sf sid bg sta st su ts tpb tb lb tab lab pt ec msd v".split(" "),Uq="d dl nor ot rtp rc su ttfb ttfbb ttlb url cmsdd cmsds".split(" "),uq=["e","sta"],yq="ps e t c b m um pe pc".split(" "),zq="spawkrfeqd".split(""),Zp=10,wq="ts",$p="t",Cq="request",cq="response",aq="event";function Vq(a){this.h=a;this.g=null}p=Vq.prototype;p.configure=function(a){this.h=a};p.Zi=function(){return this.h.enabled&&this.h.applyMaximumSuggestedBitrate&&this.g&&this.g.has(Wq)?this.g.get(Wq)*1E3:null};p.Yi=function(){return this.h.enabled&&this.g&&this.g.has(Xq)?this.g.get(Xq)*1E3:null};p.rl=function(){return this.h.enabled&&this.g&&this.g.has(Yq)?this.g.get(Yq):null};p.ul=function(){return this.h.enabled&&this.g&&this.g.has(Zq)?this.g.get(Zq):null};
p.getBandwidthEstimate=function(a){var b=this.Yi();if(!b)return a;var c=this.h.estimatedThroughputWeightRatio;return c>0&&c<=1?a*(1-c)+b*c:a};function $q(a){return a?a.toLowerCase()==="false"?!1:/^[-0-9]/.test(a)?parseInt(a,10):a.replace(/["]+/g,""):!0}S("shaka.util.CmsdManager",Vq);Vq.prototype.getBandwidthEstimate=Vq.prototype.getBandwidthEstimate;Vq.prototype.getRoundTripTime=Vq.prototype.ul;Vq.prototype.getResponseDelay=Vq.prototype.rl;Vq.prototype.getEstimatedThroughput=Vq.prototype.Yi;
Vq.prototype.getMaxBitrate=Vq.prototype.Zi;var Xq="etp",Wq="mb",Yq="rd",Zq="rtt";function ar(){this.g=null;this.h=[]}function br(a,b){return Q(function(c){if(c.g==1)return a.g?E(c,new Promise(function(d){return a.h.push(d)}),2):c.B(2);a.g=b;H(c)})}ar.prototype.release=function(){this.h.length>0?this.h.shift()():this.g=null};function X(a,b,c){b=b===void 0?null:b;mb.call(this);var d=this;this.l=cr;this.h=null;this.Re=b;this.W=!1;this.cf=new Wc;this.Se=new Wc;this.j=new Wc;this.mc=new Wc;this.Kc=new Wc;this.G=this.H=this.F=this.M=null;this.df=0;this.aa=new ar;this.O=this.Fa=this.V=this.i=this.Jc=this.I=this.m=this.Oe=this.R=this.Ei=this.oa=this.K=this.fb=this.ya=this.Qe=this.P=this.La=this.L=this.jb=null;this.Z=!1;this.We=this.u=null;this.Ve=1E9;this.$e=[];this.Gc=new Map;this.ib=[];this.Dg=-1;this.g=dr(this);this.Fg=ro();
this.T=null;this.ef=-1;this.pb=null;this.ra={width:Infinity,height:Infinity};this.Ue=new Fi(this.g,this.ra,null);this.Ye=[];this.C=null;this.J=this.g.adaptationSetCriteriaFactory();this.J.configure({language:this.g.preferredAudioLanguage,role:this.g.preferredAudioRole,videoRole:this.g.preferredVideoRole,channelCount:0,hdrLevel:this.g.preferredVideoHdrLevel,spatialAudio:this.g.preferSpatialAudio,videoLayout:this.g.preferredVideoLayout,audioLabel:this.g.preferredAudioLabel,videoLabel:this.g.preferredVideoLabel,
codecSwitchingStrategy:this.g.mediaSource.codecSwitchingStrategy,audioCodec:"",activeAudioCodec:"",activeAudioChannelCount:0,preferredAudioCodecs:this.g.preferredAudioCodecs,preferredAudioChannelCount:this.g.preferredAudioChannelCount});this.Wd=this.g.preferredTextLanguage;this.fe=this.g.preferredTextRole;this.ee=this.g.preferForcedSubs;this.Te=[];c&&c(this);this.K=new Fp(this,this.g.cmcd);this.oa=new Vq(this.g.cmsd);this.M=er(this);this.be=this.ea=this.sa=this.D=null;this.Hg=!1;this.Eg=[];this.Gg=
new Gf(function(){return Q(function(e){if(e.g==1)return d.ea?E(e,d.ec(d.be,!0),3):e.B(0);if(e.g!=4)return E(e,d.load(d.ea),4);d.Hg?d.be.pause():d.be.play();d.ea=null;d.Hg=!1;H(e)})});fr&&(this.D=fr(),this.D.configure(this.g.ads),this.Kc.o(this.D,"ad-content-pause-requested",function(e){var f,g;return Q(function(h){if(h.g==1){d.Gg.stop();if(d.ea)return h.B(0);d.be=d.h;d.Hg=d.isEnded();f=e.saveLivePosition||!1;g=!0;d.U()&&(g=f);return E(h,d.Si(!0,g),3)}d.ea=h.h;H(h)})}),this.Kc.o(this.D,"ad-content-resume-requested",
function(e){e=e.offset||0;if(d.ea){var f=d.ea;f.u&&e&&(typeof f.u==="number"?f.u+=e:f.u.setTime(f.u.getTime()+e*1E3))}d.Gg.Y(.1)}),this.Kc.o(this.D,"ad-content-attach-requested",function(){return Q(function(e){return d.h||!d.be?e.B(0):E(e,d.ec(d.be,!0),0)})}));gr&&(this.sa=gr(this),this.sa.configure(this.g.queue));this.cf.o(window,"online",function(){hr(d);d.Xh()});this.Xe=new Gf(function(){for(var e=Date.now()/1E3,f=!1,g=!0,h=u(d.i.variants),k=h.next();!k.done;k=h.next())k=k.value,k.disabledUntilTime>
0&&k.disabledUntilTime<=e&&(k.disabledUntilTime=0,f=!0),k.disabledUntilTime>0&&(g=!1);g&&d.Xe.stop();f&&ir(d,!1,void 0,!1,!1)});this.Na=null;a&&(bd("Player w/ mediaElement","Please migrate from initializing Player with a mediaElement; use the attach method instead."),this.ec(a,!0));this.A=null}ma(X,mb);function jr(a){a.R!=null&&(hd(a.R),a.R.release(),a.R=null)}function kr(a,b,c){c||b.lcevc.enabled?(jr(a),a.R==null&&(a.R=new fd(a.h,a.Ei,b.lcevc,c),a.H&&(a.H.H=a.R))):jr(a)}
function lr(a,b){return new T(a,b)}p=X.prototype;
p.destroy=function(){var a=this,b;return Q(function(c){switch(c.g){case 1:if(a.l==mr)return c.return();jr(a);b=a.detach();a.l=mr;return E(c,b,2);case 2:return E(c,a.Wg(),3);case 3:a.cf&&(a.cf.release(),a.cf=null);a.Se&&(a.Se.release(),a.Se=null);a.j&&(a.j.release(),a.j=null);a.mc&&(a.mc.release(),a.mc=null);a.Kc&&(a.Kc.release(),a.Kc=null);a.We=null;a.g=null;a.C=null;a.Re=null;a.K=null;a.oa=null;if(!a.M){c.B(4);break}return E(c,a.M.destroy(),5);case 5:a.M=null;case 4:a.u&&(a.u.release(),a.u=null),
a.sa&&(a.sa.destroy(),a.sa=null),mb.prototype.release.call(a),H(c)}})};function nr(a,b){or.set(a,b)}function pr(){window.Promise||bb("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||(navigator.userAgent||"").includes("Trident/"))return!1;Tb();return Qi()?!0:Ri().canPlayType("application/x-mpegurl")!=""}function qr(a,b){a.dispatchEvent(lr("onstatechange",(new Map).set("state",b)))}
p.ec=function(a,b){b=b===void 0?!0:b;var c=this,d,e,f;return Q(function(g){switch(g.g){case 1:if(c.l==mr)throw new U(2,7,7E3);d=c.h&&c.h==a;if(!c.h||c.h==a){g.B(2);break}return E(g,c.detach(),2);case 2:return E(g,rr(c,"attach"),4);case 4:if(g.h)return g.return();sa(g,5,6);d||(qr(c,"attach"),e=function(){var h=sr(c,!1);h&&tr(c,h)},c.Se.o(a,"error",e),c.h=a,c.K&&c.K.setMediaElement(a));Tb();if(!b||!Qi()||c.H){g.B(6);break}return E(g,ur(c),6);case 6:ya(g);c.aa.release();za(g,0);break;case 5:return f=
va(g),E(g,c.detach(),10);case 10:throw f;}})};p.Gi=function(a){this.Ei=a};p.detach=function(a){a=a===void 0?!1:a;var b=this;return Q(function(c){if(c.g==1){if(b.l==mr)throw new U(2,7,7E3);return E(c,b.vc(!1,a),2)}if(c.g!=3)return E(c,rr(b,"detach"),3);if(c.h)return c.return();try{b.h&&(b.Se.Sa(),b.h=null),qr(b,"detach"),b.D&&!a&&b.D.release()}finally{b.aa.release()}H(c)})};
function rr(a,b){var c;return Q(function(d){return d.g==1?(c=++a.df,E(d,br(a.aa,b),2)):c!=a.df?(a.aa.release(),d.return(!0)):d.return(!1)})}
p.vc=function(a,b){a=a===void 0?!0:a;b=b===void 0?!1:b;var c=this,d,e,f,g,h,k,l,m,n,q,r,t,v,w,z,y;return Q(function(A){switch(A.g){case 1:return c.l!=mr&&(c.l=cr),E(A,rr(c,"unload"),2);case 2:if(A.h)return A.return();ta(A,3);c.Z=!1;qr(c,"unload");jr(c);d=c.Te.map(function(C){return C()});c.Te=[];return E(A,Promise.all(d),5);case 5:c.dispatchEvent(lr("unloading"));c.Qe&&(c.Qe.release(),c.Qe=null);c.ya&&(c.ya.release(),c.ya=null);c.fb&&(c.fb.release(),c.fb=null);c.h&&(c.j.Sa(),c.mc.Sa());c.Xe.stop();
c.jb&&(c.jb.release(),c.jb=null);c.La&&(c.La.stop(),c.La=null);if(!c.I){A.B(6);break}return E(A,c.I.stop(),7);case 7:c.I=null,c.Jc=null;case 6:c.u&&c.u.stop();if(!c.m){A.B(8);break}return E(A,c.m.destroy(),9);case 9:c.m=null;case 8:c.L&&(c.L.release(),c.L=null);c.G&&(c.G.release(),c.G=null);if("webkit"!==window.shakaMediaKeysPolyfill||!c.F){A.B(10);break}return E(A,c.F.destroy(),11);case 11:c.F=null;case 10:if(!c.H){A.B(12);break}return E(A,c.H.destroy(),13);case 13:c.H=null;case 12:if(c.D&&!b)c.D.onAssetUnload();
c.ea&&!b&&(c.ea.destroy(),c.ea=null);b||c.Gg.stop();c.K&&Ip(c.K);c.oa&&(c.oa.g=null);if(!c.A){A.B(14);break}return E(A,c.A.destroy(),15);case 15:c.A=null;case 14:c.W=!1;if(c.h){e=u(c.Eg);for(f=e.next();!f.done;f=e.next())g=f.value,g.src.startsWith("blob:")&&URL.revokeObjectURL(g.src),g.remove();c.Eg=[];Zj(c.h)&&c.h.load()}if(!c.F){A.B(16);break}return E(A,c.F.destroy(),17);case 17:c.F=null;case 16:c.Na&&c.V!=c.Na.kd()&&(c.Na.l||c.Na.destroy(),c.Na=null);c.V=null;c.Fa=null;c.P=null;if(c.i){h=u(c.i.variants);
for(k=h.next();!k.done;k=h.next())for(l=k.value,m=u([l.audio,l.video]),n=m.next();!n.done;n=m.next())(q=n.value)&&q.segmentIndex&&q.segmentIndex.release();r=u(c.i.textStreams);for(t=r.next();!t.done;t=r.next())v=t.value,v.segmentIndex&&v.segmentIndex.release()}c.g&&c.g.streaming.clearDecodingCache&&(Zf.clear(),Jg.clear());c.i=null;c.C=new yo;c.Di=null;c.pb=null;c.T=null;c.ef=-1;c.$e=[];w=u(c.Gc.values());for(z=w.next();!z.done;z=w.next())y=z.value,y.stop();c.Gc.clear();c.ib=[];c.Dg=-1;c.M&&c.M.Ni();
vr(c);case 3:ya(A);c.aa.release();za(A,4);break;case 4:Tb();if(a&&Qi()&&!c.H&&c.h)return E(A,ur(c),0);A.B(0)}})};p.Mm=function(a){this.O=a};
p.load=function(a,b,c){b=b===void 0?null:b;var d=this,e,f,g,h,k,l,m,n,q,r,t,v,w,z;return Q(function(y){switch(y.g){case 1:if(d.l==mr)throw new U(2,7,7E3);e=null;f="";if(a instanceof Eo){if(a.l)throw new U(2,7,7006);e=a;f=e.kd()||""}else f=a||"";return E(y,br(d.aa,"load"),2);case 2:d.aa.release();if(!d.h)throw new U(2,7,7002);if(!d.V){y.B(3);break}d.V=f;return E(y,d.vc(!1),3);case 3:g=++d.df;h=function(){return Q(function(A){if(A.g==1)return d.df==g?A.B(0):e?E(A,e.destroy(),3):A.B(3);throw new U(2,
7,7E3);})};k=function(A,C){return Q(function(F){switch(F.g){case 1:return ta(F,2),E(F,br(d.aa,C),4);case 4:return E(F,h(),5);case 5:return E(F,A(),6);case 6:return E(F,h(),7);case 7:e&&d.g&&(e.g=d.g);case 2:ya(F),d.aa.release(),za(F,0)}})};sa(y,5,6);b==null&&e&&(b=e.getStartTime());d.O=b;d.Z=!1;d.dispatchEvent(lr("loading"));if(e){c=e.T;y.B(8);break}if(c){y.B(8);break}return E(y,k(function(){return Q(function(A){if(A.g==1)return E(A,wr(d,f),2);c=A.h;H(A)})},"guessMimeType_"),8);case 8:l=!!e;if(e){Ho(e,
d);d.C=e.getStats();y.B(11);break}return E(y,xr(d,f,b,c,!0,d.g),12);case 12:(e=y.h)?(e.F=!1,Ho(e,d),d.C=e.getStats(),e.start(),e.C.catch(function(){})):d.C=new yo;case 11:m=!e;n=Date.now()/1E3;d.C=e?e.getStats():new yo;d.V=f;d.Fa=c||null;vr(d);q=function(){var A=d.h?d.h.buffered:null;return{start:Pj(A)||0,end:Qj(A)||0}};d.ya=new Cm(q);d.ya.addEventListener("regionadd",function(A){yr(d,A.region,"metadataadded")});if(m)return E(y,k(function(){return Q(function(A){return E(A,zr(d,c),0)})},"initializeSrcEqualsDrmInner_"),
23);d.fb=new Cm(q);return E(y,k(function(){return Q(function(A){if(A.g==1)return E(A,Promise.race([e.aa,e.C]),2);d.Jc=e.H;var C=e;C.ea=!0;d.I=C.m;d.i=e.uh();H(A)})},"waitForFinish"),15);case 15:if(d.H){y.B(16);break}return E(y,k(function(){return Q(function(A){return E(A,ur(d),0)})},"initializeMediaSourceEngineInner_"),16);case 16:return d.i&&d.i.textStreams.length&&(d.A.enableTextDisplayer?d.A.enableTextDisplayer():bd("Text displayer w/ enableTextDisplayer",'Text displayer should have a "enableTextDisplayer" method!')),
E(y,k(function(){return Q(function(A){return E(A,e.C,0)})},"waitForFinish"),18);case 18:d.g=e.getConfiguration();d.Ue=e.G;d.I&&d.I.setMediaElement&&d.h&&d.I.setMediaElement(d.h);d.Qe=Io(e);d.Oe=e.Fa;if(r=e.D)d.J=r;l&&d.h&&d.h.nodeName==="AUDIO"&&(Ar(d),d.configure("manifest.disableVideo",!0));if(e.j){y.B(19);break}return E(y,k(function(){return Q(function(A){return E(A,No(e,d.h),0)})},"drmEngine_.init"),19);case 19:return d.F=Jo(e),E(y,k(function(){return Q(function(A){return E(A,d.F.ec(d.h),0)})},
"drmEngine_.attach"),21);case 21:return t=d.g.abrFactory,d.u&&d.We==t||(d.We=t,d.u&&d.u.release(),d.u=t(),typeof d.u.setMediaElement!="function"&&(bd("AbrManager w/o setMediaElement","Please use an AbrManager with setMediaElement function."),d.u.setMediaElement=function(){}),typeof d.u.setCmsdManager!="function"&&(bd("AbrManager w/o setCmsdManager","Please use an AbrManager with setCmsdManager function."),d.u.setCmsdManager=function(){}),typeof d.u.trySuggestStreams!="function"&&(bd("AbrManager w/o trySuggestStreams",
"Please use an AbrManager with trySuggestStreams function."),d.u.trySuggestStreams=function(){}),d.u.configure(d.g.abr)),v=Ko(e),w=e.i,E(y,k(function(){return Q(function(A){return E(A,Br(d,n,w,v),0)})},"loadInner_"),22);case 22:Go(e);d.Fa&&Tb().mg()&&rf(d.Fa)&&Mk(d.H,d.V,d.Fa);y.B(14);break;case 23:return E(y,k(function(){return Q(function(A){return E(A,Cr(d,n,c),0)})},"srcEqualsInner_"),14);case 14:d.dispatchEvent(lr("loaded"));case 6:ya(y);if(!e){y.B(25);break}return E(y,e.destroy(),25);case 25:d.Na=
null;za(y,0);break;case 5:z=va(y);if(!z||z.code==7E3){y.B(27);break}return E(y,d.vc(!1),27);case 27:throw z;}})};function Ar(a){for(var b=u(a.i.variants),c=b.next();!c.done;c=b.next())c=c.value,c.video&&(c.video.closeSegmentIndex(),c.video=null),c.bandwidth=c.audio&&c.audio.bandwidth?c.audio.bandwidth:0;a.i.variants=a.i.variants.filter(function(d){return d.audio})}
p.ik=function(a,b,c){a=a===void 0?!0:a;b=b===void 0?!1:b;c=c===void 0?!1:c;var d=this,e;return Q(function(f){return f.g==1?E(f,Dr(d,c),2):f.g!=3?(e=f.h,E(f,d.vc(a,b),3)):f.return(e)})};p.Si=function(a,b){a=a===void 0?!1:a;b=b===void 0?!1:b;var c=this,d;return Q(function(e){return e.g==1?E(e,Dr(c,b),2):e.g!=3?(d=e.h,E(e,c.detach(a),3)):e.return(d)})};
function Dr(a,b){b=b===void 0?!1:b;var c,d,e;return Q(function(f){if(f.g==1){c=null;if(!(a.i&&a.I&&a.Jc&&a.V&&a.g))return f.B(2);d=a.h.currentTime;b||(d=null);return E(f,Er(a,a.V,d,a.Fa,a.g,!0,!1),3)}if(f.g!=2){c=f.h;a.Ye.push(c);a.I&&a.I.setMediaElement&&a.I.setMediaElement(null);if(e=a.m?a.m.u:null)c.i=e;var g=c,h=a.I,k=a.Jc;g.h=a.i;g.m=h;g.H=k;c.D=a.J;c.start();a.i=null;a.I=null;a.Jc=null;a.u=null;a.We=null}return f.return(c)})}
p.preload=function(a,b,c,d){b=b===void 0?null:b;var e=this,f,g;return Q(function(h){if(h.g==1)return f=dr(e),so(f,d||e.g,dr(e)),E(h,xr(e,a,b,c,!1,f),2);(g=h.h)?g.start():tr(e,new U(2,7,7005));return h.return(g)})};p.Wg=function(){var a=this,b,c,d,e;return Q(function(f){b=[];c=u(a.Ye);for(d=c.next();!d.done;d=c.next())e=d.value,e.l||b.push(e.destroy());a.Ye=[];return E(f,Promise.all(b),0)})};
function xr(a,b,c,d,e,f){e=e===void 0?!1:e;var g,h,k,l;return Q(function(m){if(m.g==1)return d?m.B(2):E(m,wr(a,b),3);m.g!=2&&(d=m.h);if(g=Fr(a,d))return m.return(null);h=f||a.g;k=!1;e&&a.h&&a.h.nodeName==="AUDIO"&&(k=!0);l=Er(a,b,c,d||null,h,!e,k);l=e?l.then(function(n){n.F=!1;return n}):l.then(function(n){a.Ye.push(n);return n});return m.return(l)})}
function Er(a,b,c,d,e,f,g){f=f===void 0?!0:f;g=g===void 0?!1:g;var h,k,l,m,n,q,r,t,v,w,z,y,A,C,F;return Q(function(D){if(D.g==1){h=null;k=Kd(e);g&&(k.manifest.disableVideo=!0);l=function(){return h.P&&h.l?null:h};m=function(){return l()?l().getConfiguration():a.g};if(a.ra.width!=Infinity||a.ra.height!=Infinity||a.g.ignoreHardwareResolution)return D.B(2);n=Tb();return E(D,n.yc(),3)}D.g!=2&&(q=D.h,a.ra.width=q.width,a.ra.height=q.height);r=new Fi(k,a.ra,null);t={networkingEngine:a.M,filter:function(B){var G,
K;return Q(function(I){if(I.g==1)return E(I,Gi(r,B),2);if(I.g!=4){G=I.h;if(!G)return I.B(0);K=lr("trackschanged");return E(I,Promise.resolve(),4)}h.dispatchEvent(K);H(I)})},makeTextStreamsForClosedCaptions:function(B){return Gr(a,B)},onTimelineRegionAdded:function(B){Dm(h.I,B)},onEvent:function(B){return h.dispatchEvent(B)},onError:function(B){return h.onError(B)},isLowLatencyMode:function(){return m().streaming.lowLatencyMode},updateDuration:function(){a.m&&h.P&&a.m.updateDuration()},newDrmInfo:function(B){var G=
h.j,K=G?G.h:null;K&&G.C&&Ji(r,K.keySystem,B)},onManifestUpdated:function(){var B=(new Map).set("isLive",a.U());h.dispatchEvent(lr("manifestupdated",B));Fo(h,!1,function(){if(a.D)a.D.onManifestUpdated(a.U())})},getBandwidthEstimate:function(){return a.u.getBandwidthEstimate()},onMetadata:function(B,G,K,I){var J=B;if(B=="com.apple.hls.interstitial"||B=="com.apple.hls.overlay")if(J="com.apple.quicktime.HLS",B={startTime:G,endTime:K,values:I},a.D)a.D.onHLSInterstitialMetadata(a,a.h,B);I=u(I);B=I.next();
for(var L={};!B.done;L={Rh:void 0},B=I.next())L.Rh=B.value,L.Rh.name!="ID"&&Fo(h,!1,function(N){return function(){Hr(a,G,K,J,N.Rh)}}(L))},disableStream:function(B){return a.disableStream(B,a.g.streaming.maxDisabledTime)},addFont:function(B,G){return a.addFont(B,G)}};v=new Cm(function(){return a.wa()});v.addEventListener("regionadd",function(B){var G=B.region;Ir(a,"timelineregionadded",G,h);Fo(h,!1,function(){a.D&&(a.D.onDashTimedMetadata(G),a.D.onDASHInterstitialMetadata(a,a.h,G))})});w=null;k.streaming.observeQualityChanges&&
(w=new wm(function(){return a.Rc()}),w.addEventListener("qualitychange",function(B){Jr(a,B.quality,B.position)}),w.addEventListener("audiotrackchange",function(B){Jr(a,B.quality,B.position,!0)}));z=!0;y={Fc:a.M,onError:function(B){return h.onError(B)},Uf:function(B){Fo(h,!0,function(){a.F&&Kr(a,B)})},onExpirationUpdated:function(B,G){var K=lr("expirationupdated");h.dispatchEvent(K);if((K=h.m)&&K.onExpirationUpdated)K.onExpirationUpdated(B,G)},onEvent:function(B){h.dispatchEvent(B);B.type=="drmsessionupdate"&&
z&&(z=!1,B=Date.now()/1E3-h.sa,(a.C||h.getStats()).m=B,a.R&&hd(a.R))}};A=er(a,l);ih(a.M,A);C=function(){return a.Ed(y)};F={config:k,Xl:t,jm:v,im:w,Ed:C,Wl:r,networkingEngine:A,vk:f};h=new Eo(b,d,c,F);return D.return(h)})}
function wr(a,b){var c,d,e,f;return Q(function(g){if(g.g==1)return c=a.g.manifest.retryParameters,E(g,bp(b,a.M,c),2);d=g.h;d=="application/x-mpegurl"&&(e=Tb(),e.Ja()==="WEBKIT"&&(d="application/vnd.apple.mpegurl"));d=="video/quicktime"&&(f=Tb(),f.Ja()==="CHROMIUM"&&(d="video/mp4"));return g.return(d)})}
function Fr(a,b){if(!Qi(Tb()))return!0;if(b){if((a.h||Ri()).canPlayType(b)=="")return!1;if(!Qi(Tb())||!Oi.has(b))return!0;if(rf(b))return Tb().Ja()==="WEBKIT"&&(a.g.drm.servers["com.apple.fps"]||a.g.drm.servers["com.apple.fps.1_0"])?a.g.streaming.useNativeHlsForFairPlay:a.g.streaming.preferNativeHls;if(b==="application/dash+xml"||b==="video/vnd.mpeg.dash.mpd")return a.g.streaming.preferNativeDash}return!1}
function Lr(a,b){var c=a.g.textDisplayFactory;a.Di!==c||(b===void 0?0:b)?(b=a.A,a.A=c(),a.A.configure?a.A.configure(a.g.textDisplayer):bd("Text displayer w/ configure",'Text displayer should have a "configure" method!'),a.A.setTextLanguage||bd("Text displayer w/ setTextLanguage",'Text displayer should have a "setTextLanguage" method!'),b?(a.A.setTextVisibility(b.isTextVisible()),b.destroy().catch(function(){})):a.A.setTextVisibility(a.W),a.H&&wl(a.H,a.A),a.Di=c,a.m&&on(a.m)):a.A&&a.A.configure&&a.A.configure(a.g.textDisplayer)}
function ur(a){var b,c,d;return Q(function(e){if(e.g==1)return Tb(),qr(a,"media-source"),a.g.mediaSource.useSourceElements&&Zj(a.h),Lr(a),b=Mr(a.h,a.A,{Xk:function(){return a.keySystem()},onMetadata:function(f,g,h){f=u(f);for(var k=f.next();!k.done;k=f.next())if(k=k.value,k.data&&typeof k.cueTime=="number"&&k.frames){var l=k.cueTime+g,m=h;m&&l>m&&(m=l);for(var n=u(k.frames),q=n.next();!q.done;q=n.next())Hr(a,l,m,"org.id3",q.value);if(a.D)a.D.onHlsTimedMetadata(k,l)}},bm:function(f){a.fb&&Dm(a.fb,
{schemeIdUri:f.schemeIdUri,startTime:f.startTime,endTime:f.endTime,id:String(f.id),emsg:f})},onEvent:function(f){return a.dispatchEvent(f)},fm:function(){a.I&&a.I.update&&a.I.update()}},a.R,a.g.mediaSource),c=a.g.manifest,d=c.segmentRelativeVttTiming,b.Fa=d,E(e,b.L,2);a.H=b;H(e)})}
function Nr(a,b,c){function d(){return Or(a)}a.j.o(b,"playing",d);a.j.o(b,"pause",d);a.j.o(b,"ended",d);a.j.o(b,"ratechange",function(){var f=a.h.playbackRate;f!=0&&(a.L&&(a.L.set(f),a.l==Pr&&a.u.playbackRateChanged(f),Qr(a,f)),f=lr("ratechange"),a.dispatchEvent(f))});b.remote&&(a.j.o(b.remote,"connect",function(){a.m&&b.remote.state=="connected"&&Rr(a);Sr(a)}),a.j.o(b.remote,"connecting",function(){return Sr(a)}),a.j.o(b.remote,"disconnect",function(){return Q(function(f){if(f.g==1)return a.m&&b.remote.state==
"disconnected"?E(f,Cn(a.m),3):f.B(2);f.g!=2&&Rr(a);Sr(a);H(f)})}));b.audioTracks&&(a.j.o(b.audioTracks,"addtrack",function(){return Sr(a)}),a.j.o(b.audioTracks,"removetrack",function(){return Sr(a)}),a.j.o(b.audioTracks,"change",function(){return Sr(a)}));b.videoTracks&&(a.j.o(b.videoTracks,"addtrack",function(){return Sr(a)}),a.j.o(b.videoTracks,"removetrack",function(){return Sr(a)}),a.j.o(b.videoTracks,"change",function(){return Sr(a)}));(b.webkitPresentationMode||b.webkitSupportsFullscreen)&&
a.j.o(b,"webkitpresentationmodechanged",function(){a.Re&&Lr(a,!0)});if(b.textTracks){var e=function(){a.l===Tr&&a.A instanceof pp&&Rr(a);Sr(a)};a.j.o(b.textTracks,"addtrack",function(f){if(f.track)switch(f=f.track,f.kind){case "metadata":Ur(a,f);break;case "chapters":Vr(a,f);break;default:e()}});a.j.o(b.textTracks,"removetrack",e);a.j.o(b.textTracks,"change",e)}b.preload!="none"&&a.j.ua(b,"loadedmetadata",function(){a.C.G=Date.now()/1E3-c})}
function Br(a,b,c,d){var e,f,g,h,k,l,m,n,q,r,t,v,w,z,y,A,C,F,D,B,G,K,I,J,L,N,P,O;return Q(function(M){switch(M.g){case 1:qr(a,"load");e=a.h;a.L=new sm({yf:function(){return e.playbackRate},ld:function(){return e.defaultPlaybackRate},gi:function(R){e.playbackRate=R},sj:function(R){e.currentTime+=R}});Nr(a,e,b);"onchange"in window.screen&&a.j.o(window.screen,"change",function(){if(a.J.getConfiguration){var R=a.J.getConfiguration();R.hdrLevel=="AUTO"?Wr(a):a.g.preferredVideoHdrLevel=="AUTO"&&a.g.abr.enabled&&
(R.hdrLevel="AUTO",a.J.configure(R),Wr(a))}});f=!1;g=u(a.i.variants);for(h=g.next();!h.done;h=g.next())k=h.value,(l=k.video&&k.video.dependencyStream)&&(f=id(l));kr(a,a.g,f);a.Wd=a.g.preferredTextLanguage;a.fe=a.g.preferredTextRole;a.ee=a.g.preferForcedSubs;Xr(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.u.init(function(R,V,xa){a.i&&a.m&&R!=a.m.u&&Yr(a,R,!0,V===void 0?!1:V,xa===void 0?0:xa)});a.u.setMediaElement(e);a.u.setCmsdManager(a.oa);a.m=Zr(a);a.m.configure(a.g.streaming);
a.l=Pr;a.dispatchEvent(lr("streaming"));m=c;case 2:(q=a.m.u)||m||(m=$r(a,!0));r=[];n=q||m;t=u([n.video,n.audio]);for(v=t.next();!v.done;v=t.next())(w=v.value)&&!w.segmentIndex&&(r.push(w.createSegmentIndex()),w.dependencyStream&&r.push(w.dependencyStream.createSegmentIndex()));if(!(r.length>0)){M.B(4);break}return E(M,Promise.all(r),4);case 4:if(!n||n.disabledUntilTime!=0){M.B(2);break}if(a.I&&a.I.onInitialVariantChosen)a.I.onInitialVariantChosen(n);a.i.isLowLatency&&(a.g.streaming.lowLatencyMode?
a.configure(a.Fg):bb("Low-latency live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details."));a.K&&(Kp(a.K,a.i.isLowLatency&&a.g.streaming.lowLatencyMode),Pp(a.K,b*1E3));Xr(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);dn(a.m,a.g.playRangeStart,a.g.playRangeEnd);a.Z=!0;a.dispatchEvent(lr("canupdatestarttime"));z=function(R){a.G=as(a,R);a.jb=bs(a,R);cs(a,e,!1)};
a.g.streaming.startAtSegmentBoundary||(y=a.O,y==null&&a.i.startTime&&(y=a.i.startTime),z(y));if(q){M.B(7);break}if(!a.g.streaming.startAtSegmentBoundary){M.B(8);break}A=a.i.presentationTimeline;a.O instanceof Date&&(F=A.m||A.i,D=a.O.getTime()/1E3-F,D!=null&&(C=D));C==null&&(C=typeof a.O==="number"?a.O:a.h.currentTime);a.O==null&&a.i.startTime&&(C=a.i.startTime);B=A.jc();G=A.Ob();C<B?C=B:C>G&&(C=G);return E(M,ds(m,C),9);case 9:K=M.h,z(K);case 8:Yr(a,m,!0,!1,0);case 7:return a.G.ready(),I=a.Bc().find(function(R){return R.active}),
I||((J=qg(a.i.textStreams,a.Wd,a.fe,a.ee)[0]||null)&&xo(a.C.h,J,!0),m&&(J?(ug(m.audio,J,a.g)&&(a.W=!0),a.W&&a.A.setTextVisibility(!0)):(a.W=!1,a.A.setTextVisibility(!1)),es(a)),J&&(a.g.streaming.alwaysStreamText||a.Yc())&&(nn(a.m,J),fs(a))),E(M,a.m.start(d),10);case 10:a.g.abr.enabled&&(a.u.enable(),gs(a));Sr(a);a.i.variants.some(function(R){return R.primary});if((L=a.U())&&(a.g.streaming.liveSync&&a.g.streaming.liveSync.enabled||a.i.serviceDescription||a.g.streaming.liveSync.panicMode)||a.g.streaming.vodDynamicPlaybackRate)N=
function(){return hs(a)},a.j.o(e,"timeupdate",N);L||(P=function(){return is(a)},a.j.o(e,"timeupdate",P),is(a),a.i.nextUrl&&(a.g.streaming.preloadNextUrlWindow>0&&(O=function(){var R;return Q(function(V){if(V.g==1){R=a.wa().end-a.h.currentTime;if(isNaN(R)||!(R<=a.g.streaming.preloadNextUrlWindow))return V.B(0);a.j.Ea(e,"timeupdate",O);return E(V,a.preload(a.i.nextUrl),4)}a.Na=V.h;H(V)})},a.j.o(e,"timeupdate",O)),a.j.o(e,"ended",function(){a.load(a.Na||a.i.nextUrl)})));if(a.D)a.D.onManifestUpdated(L);
H(M)}})}function zr(a,b){var c,d,e;return Q(function(f){return f.g==1?(c=Date.now()/1E3,d=!0,a.F=a.Ed({Fc:a.M,onError:function(g){tr(a,g)},Uf:function(){},onExpirationUpdated:function(){var g=lr("expirationupdated");a.dispatchEvent(g)},onEvent:function(g){a.dispatchEvent(g);g.type=="drmsessionupdate"&&d&&(d=!1,a.C.m=Date.now()/1E3-c)}}),a.F.configure(a.g.drm),e=vg([b]),a.F.P=!0,E(f,Sh(a.F,[e],[]),2)):E(f,a.F.ec(a.h),0)})}
function Cr(a,b,c){var d,e,f,g,h,k,l,m,n,q,r,t;return Q(function(v){switch(v.g){case 1:qr(a,"src-equals");d=a.h;a.G=new em(d);e=!1;a.Te.push(function(){e=!0});a.dispatchEvent(lr("canupdatestarttime"));a.O!=null&&a.G.Cg(a.O);a.jb=js(a,a.O||0);a.L=new sm({yf:function(){return d.playbackRate},ld:function(){return d.defaultPlaybackRate},gi:function(w){d.playbackRate=w},sj:function(w){d.currentTime+=w}});cs(a,d,!0);d.textTracks&&(Lr(a),f=function(w){if(!(a.A instanceof pp)){var z=ks(a).find(function(y){return y.mode!==
"disabled"});z&&(z.mode=w?"showing":"hidden");a.A instanceof rp&&(z=ls(a))&&(z.mode=!w&&a.A.isTextVisible()?"showing":"hidden")}},a.j.o(d,"enterpictureinpicture",function(){return f(!0)}),a.j.o(d,"leavepictureinpicture",function(){return f(!1)}),d.remote?(a.j.o(d.remote,"connect",function(){return f(!1)}),a.j.o(d.remote,"connecting",function(){return f(!1)}),a.j.o(d.remote,"disconnect",function(){return f(!1)})):"webkitCurrentPlaybackTargetIsWireless"in d&&a.j.o(d,"webkitcurrentplaybacktargetiswirelesschanged",
function(){return f(!1)}),g=d,(g.webkitPresentationMode||g.webkitSupportsFullscreen)&&a.j.o(g,"webkitpresentationmodechanged",function(){g.webkitPresentationMode?f(g.webkitPresentationMode!=="inline"):g.webkitSupportsFullscreen&&f(g.webkitDisplayingFullscreen)}));Nr(a,d,b);h=Rp(a.K,a.V,c);!h.includes("#t=")&&(a.g.playRangeStart>0||isFinite(a.g.playRangeEnd))&&(h+="#t=",a.g.playRangeStart>0&&(h+=a.g.playRangeStart),isFinite(a.g.playRangeEnd)&&(h+=","+a.g.playRangeEnd));if(!a.H){v.B(2);break}return E(v,
a.H.destroy(),3);case 3:a.H=null;case 2:return Zj(d),d.src=h,k=Tb(),k.Oa()=="TV"&&d.load(),d.preload!="none"&&!d.autoplay&&rf(c)&&k.Ja()==="WEBKIT"&&d.load(),a.l=Tr,a.dispatchEvent(lr("streaming")),l=function(){return new Promise(function(w){var z=new Gf(w);a.j.o(d.textTracks,"change",function(){return z.Y(.5)});z.Y(.5)})},m=new Kg,Wl(d,HTMLMediaElement.HAVE_METADATA,a.j,function(){return Q(function(w){if(w.g==1)return a.G.ready(),a.Fa&&rf(a.Fa)?E(w,l(),3):(m.resolve(),w.B(0));m.resolve();H(w)})}),
Wl(d,HTMLMediaElement.HAVE_CURRENT_DATA,a.j,function(){var w,z,y,A,C;return Q(function(F){if(F.g==1)return E(F,l(),2);if(e)return F.return();ms(a);w=ks(a);w.some(function(D){return D.mode==="showing"})&&(a.W=!0,a.A.setTextVisibility(!0));if(!(a.A instanceof pp))for(w.length&&(a.A.enableTextDisplayer?a.A.enableTextDisplayer():bd("Text displayer w/ enableTextDisplayer",'Text displayer should have a "enableTextDisplayer" method')),z=!1,y=u(w),A=y.next();!A.done;A=y.next())C=A.value,C.mode!=="disabled"&&
(z?(C.mode="disabled",bb("Found more than one enabled text track, disabling it",C)):(ns(a,C),z=!0));os(a);H(F)})}),d.error?m.reject(sr(a)):d.preload=="none"&&(bb('With <video preload="none">, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'),m.resolve()),a.j.ua(d,"error",function(){m.reject(sr(a))}),E(v,Kf(a.g.streaming.loadTimeout,m),4);case 4:if((n=
a.U())&&(a.g.streaming.liveSync&&a.g.streaming.liveSync.enabled||a.g.streaming.liveSync.panicMode)||a.g.streaming.vodDynamicPlaybackRate)q=function(){return hs(a)},a.j.o(d,"timeupdate",q);n||(r=function(){return is(a)},a.j.o(d,"timeupdate",r),is(a));a.D&&(a.D.onManifestUpdated(n),n&&(t=a.wa().end,a.j.o(d,"progress",function(){var w=a.wa().end;t!=w&&(a.D.onManifestUpdated(a.U()),t=w)})));a.Z=!0;H(v)}})}function ms(a){var b=a.g.preferredAudioLanguage;b!=""&&a.Mj(b,a.g.preferredAudioRole)}
function os(a){var b=a.g.preferredTextLanguage;b!=""&&a.ai(b,a.g.preferredTextRole,a.g.preferForcedSubs)}
function Ur(a,b){if(b.kind=="metadata"){b.mode="hidden";a.j.o(b,"cuechange",function(){if(b.activeCues)for(var d=u(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,Hr(a,e.startTime,e.endTime,e.type,e.value),a.D)a.D.onCueMetadataChange(e.value);if(b.cues){d=[];e=u(b.cues);for(var f=e.next(),g={};!f.done;g={Pc:void 0},f=e.next())g.Pc=f.value,g.Pc.type=="com.apple.quicktime.HLS"&&g.Pc.startTime!=null&&(f=d.find(function(h){return function(k){return k.startTime==h.Pc.startTime&&k.endTime==h.Pc.endTime}}(g)),
f||(f={startTime:g.Pc.startTime,endTime:g.Pc.endTime,values:[]},d.push(f)),f.values.push(g.Pc.value));d=u(d);for(e=d.next();!e.done;e=d.next())e=e.value,e.values.some(function(h){return h.key=="X-ASSET-URI"||h.key=="X-ASSET-LIST"})&&a.D&&(e.values.push({key:"CUE",description:"",data:e.startTime!=0||a.U()?"ONCE":"ONCE,PRE",mimeType:null,pictureType:null}),a.D.onHLSInterstitialMetadata(a,a.h,e))}});var c=(new Gf(function(){var d=ps(a);d=u(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).Ka().Y(.5);
a.Te.push(function(){c.stop()})}}function yr(a,b,c){b=(new Map).set("startTime",b.startTime).set("endTime",b.endTime).set("metadataType",b.schemeIdUri).set("payload",b.payload);a.dispatchEvent(lr(c,b))}function Hr(a,b,c,d,e){a.ya&&(b={schemeIdUri:d,startTime:b,endTime:c||Infinity,id:"",payload:e},b.id=JSON.stringify(b),Dm(a.ya,b))}function Vr(a,b){if(b&&b.kind=="chapters"){b.mode="hidden";var c=(new Gf(function(){b.mode="hidden"})).Ka().Y(.5);a.Te.push(function(){c.stop()})}}
p.pm=function(){for(var a=this.aa;a.g;)a.release()};p.Ed=function(a){return new Lh(a)};
function er(a,b){function c(f){b()?b().dispatchEvent(f):a.dispatchEvent(f)}function d(f){b()?Fo(b(),!0,f):f()}b||(b=function(){return null});var e=new eh(function(f,g,h,k,l){d(function(){a.u&&a.u.segmentDownloaded(f,g,h,k,l)})},function(f,g,h){g=(new Map).set("headers",f).set("request",g).set("requestType",h);c(lr("downloadheadersreceived",g));d(function(){if(a.oa){var k=a.oa;if(k.h.enabled){var l=f["cmsd-static"];if(l)try{var m=new Map,n=l.split(",");for(l=0;l<n.length;l++){var q=n[l].split("=");
m.set(q[0],$q(q[1]))}}catch(z){}if(m=f["cmsd-dynamic"]){a:{try{var r=new Map,t=m.split(";");for(m=1;m<t.length;m++){var v=t[m].split("=");r.set(v[0],$q(v[1]))}var w=r;break a}catch(z){w=null;break a}w=void 0}w&&(k.g=w)}}}})},function(f,g){f=(new Map).set("request",f).set("response",g);c(lr("downloadcompleted",f))},function(f,g,h,k){f=(new Map).set("request",f).set("error",g).set("httpResponseCode",h).set("aborted",k);c(lr("downloadfailed",f))},function(f,g,h){d(function(){if(a.K){var k=a.K,l=h;l=
l===void 0?{}:l;if(k.g.enabled)if(g.method==="HEAD")Bq(k,g,{});else switch(f){case 0:try{if(k.g.enabled){if(l.type){a:{switch(l.type){case 4:var m=k.A?Mp:Lp;break a;case 3:case 2:m=k.A?Op:Np;break a;case 5:m="s";break a}m=void 0}k.l=m}Bq(k,g,{ot:Vp,su:!k.F})}}catch(q){cb("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",q)}break;case ph:try{if(k.g.enabled){var n=Qq(k,l,g.uris[0]);n.ts=Date.now();k.m.has(g)&&k.m.delete(g);k.m.set(g,n.ts);Bq(k,g,n)}}catch(q){cb("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",
q)}break;case 2:case 5:case 6:Bq(k,g,{ot:"k"});break;case 4:Bq(k,g,{ot:"o"})}}})},function(f,g,h,k){(f=b()?b().m:a.I)&&f.banLocation&&f.banLocation(k)},function(f,g,h){if(g.data){var k=g.data.byteLength,l=b()?b().getStats():a.C;l&&(Co(l,k),f===0&&(l.mj=k));k=a.K;h=h===void 0?{}:h;if(bq(k).length!==0)switch(f){case ph:try{var m=Qq(k,h,g.uri);g.originalRequest&&g.originalRequest.timeToFirstByte!=null&&(m.ttfb=g.originalRequest.timeToFirstByte);g.timeMs!=null&&(m.ttlb=g.timeMs);var n=g.originalUri||
g.uri;if(n.includes("CMCD="))try{var q=new URL(n);q.searchParams.delete("CMCD");var r=q.toString()}catch(B){r=n}else r=n;m.url=r;k.m.has(g.originalRequest)?(m.ts=k.m.get(g.originalRequest),k.m.delete(g.originalRequest)):m.ts||(m.ts=Date.now());var t=bq(k);if(t.length!==0){var v=k.g.version==eq?Array.from(new Set([].concat(x(tq),x(Uq)))):Fq;m.rc=g.status||0;var w=dq(k,m,cq);g.headers&&g.headers["CMSD-Static"]&&(w.cmsds=btoa(g.headers["CMSD-Static"]));g.headers&&g.headers["CMSD-Dynamic"]&&(w.cmsdd=
btoa(g.headers["CMSD-Dynamic"]));for(var z=u(t),y=z.next();!y.done;y=z.next()){var A=y.value,C=vq(A.includeKeys||[],v),F=Dq(A);k.u[F]||(k.u[F]={request:1,response:1});w.sn=k.u[F].response++;var D=xq(w,C);Aq(k,D,A,g)}}}catch(B){cb("CMCD_SEGMENT_ERROR","Could not generate response segment CMCD data.",B)}}}});e.configure(a.g.networking);return e}
function as(a,b){return new hm(a.h,a.i,a.g.streaming,b,function(){a.jb&&vm(a.jb,!a.G.Bi());a.m&&a.m.sd();a.P&&qs(a,"seeking")},function(c){return a.dispatchEvent(c)})}
function bs(a,b){var c=a.U()||typeof b==="number"&&b>0;b=new Xo(a.Qe,c);b.addEventListener("enter",function(f){Ir(a,"timelineregionenter",f.region)});b.addEventListener("exit",function(f){Ir(a,"timelineregionexit",f.region)});b.addEventListener("skip",function(f){var g=f.region;f.seeking||(Ir(a,"timelineregionenter",g),Ir(a,"timelineregionexit",g))});var d=new Xo(a.ya,c);d.addEventListener("enter",function(f){yr(a,f.region,"metadata")});c=new Xo(a.fb,c);c.addEventListener("enter",function(f){f=(new Map).set("detail",
f.region.emsg);a.dispatchEvent(lr("emsg",f))});var e=new um(a.h);e.g.add(b);e.g.add(d);e.g.add(c);a.Oe&&e.g.add(a.Oe);return e}function js(a,b){b=new Xo(a.ya,b instanceof Date||b>0);b.addEventListener("enter",function(d){yr(a,d.region,"metadata")});var c=new um(a.h);c.g.add(b);return c}
function cs(a,b,c){a.P=new Bi;Ei(a.P,Di);rs(a);vr(a);a.La=new Gf(function(){qs(a)});a.g.streaming.rebufferingGoal&&a.La.xa(.25);a.j.o(b,"waiting",function(){return qs(a,"waiting")});a.j.o(b,"canplaythrough",function(){return qs(a,"canplaythrough")});a.j.o(b,"playing",function(){return qs(a,"playing")});a.j.o(b,"seeked",function(){return qs(a,"seeked")});c&&(a.j.o(b,"stalled",function(){return qs(a,"stalled")}),a.j.o(b,"progress",function(){return qs(a,"progress")}),a.j.o(b,"timeupdate",function(){return qs(a,
"timeupdate")}))}function rs(a){var b=a.g.streaming.rebufferingGoal;a.P.i.set(Ci,Math.min(.5,b/2)).set(Di,b)}function qs(a,b){if(a.g.streaming.rebufferingGoal){b=a.H?Ok(a.H):!1;b=a.isEnded()||b||a.G.ij();var c=Sj(a.h.buffered,a.h.currentTime),d=a.P,e=d.i.get(d.g);Ei(d,b||c>=e&&c>0?Ci:Di)&&vr(a)}else if(b){c=void 0;switch(b){case "seeking":case "waiting":c=Di;break;case "canplaythrough":case "playing":case "seeked":c=Ci}c!==void 0&&Ei(a.P,c)&&vr(a)}}
function Mr(a,b,c,d,e){return new Ik(a,b,c,e,d)}
function Zr(a){return new Ym(a.i,{Ac:function(){return a.G?a.G.bf():0},getBandwidthEstimate:function(){return a.u.getBandwidthEstimate()},Za:function(){return a.Za()},video:a.h,ha:a.H,Fc:a.M,onError:function(b){return tr(a,b)},onEvent:function(b){return a.dispatchEvent(b)},Vf:function(b,c,d){var e=b.startTime,f=b.endTime,g=c.type;if(g!=vc){if(a.G){a.G.uj();var h=Wk(a.H,g);!a.U()&&a.h.paused&&!a.h.seeking&&h!=null&&h>0&&a.G.bf()<h&&a.G.Cg(h)}qs(a)}d=(new Map).set("start",e).set("end",f).set("contentType",
g).set("isMuxed",d);a.dispatchEvent(lr("segmentappended",d));a.u&&c.fastSwitching&&b.od&&b.ze&&a.u.trySuggestStreams()},dm:function(b,c){(c=c.Pd)&&a.Oe&&ym(a.Oe,c,b)},Ji:function(b,c){var d=a.F;if(d.g.parseInbandPsshEnabled&&!d.H&&["audio","video"].includes(b)){b=new Jh(Lb(c));c=0;for(var e=u(b.data),f=e.next();!f.done;f=e.next())c+=f.value.length;if(c==0)d=Promise.resolve();else{c=new Uint8Array(c);e=0;b=u(b.data);for(f=b.next();!f.done;f=b.next())f=f.value,c.set(f,e),e+=f.length;bi(d,"cenc",c);
d=d.m}}else d=Promise.resolve();return d},disableStream:function(b,c){return a.disableStream(b,c)},Gm:function(b,c){return a.g.abr.enabled&&c.fastSwitching&&b.od&&b.ze?!1:!0}})}
p.configure=function(a,b){var c=this.getConfiguration();arguments.length==2&&typeof a=="string"&&(a=Rn(a,b));"preferredVariantRole"in a&&(bd("preferredVariantRole configuration","Please Use preferredAudioRole instead."),a.preferredAudioRole=a.preferredVariantRole,delete a.preferredVariantRole);a.streaming&&"forceTransmuxTS"in a.streaming&&(bd("streaming.forceTransmuxTS configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource=a.mediaSource||{},a.mediaSource.mediaSource=a.streaming.forceTransmuxTS,
delete a.streaming.forceTransmuxTS);a.streaming&&"forceTransmux"in a.streaming&&(bd("streaming.forceTransmux configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource=a.mediaSource||{},a.mediaSource.mediaSource=a.streaming.forceTransmux,delete a.streaming.forceTransmux);if(a.streaming&&"useNativeHlsOnSafari"in a.streaming){bd("streaming.useNativeHlsOnSafari configuration","Please Use streaming.useNativeHlsForFairPlay or streaming.preferNativeHls instead.");var d=Tb();a.streaming.preferNativeHls=
a.streaming.useNativeHlsOnSafari&&d.Ja()==="WEBKIT";delete a.streaming.useNativeHlsOnSafari}a.streaming&&typeof a.streaming.liveSync=="boolean"&&(bd("streaming.liveSync","Please Use streaming.liveSync.enabled instead."),d=a.streaming.liveSync,a.streaming.liveSync={},a.streaming.liveSync.enabled=d);if(a.streaming&&!(a.streaming.liveSync&&"targetLatency"in a.streaming.liveSync)&&("liveSyncMinLatency"in a.streaming||"liveSyncMaxLatency"in a.streaming)){d=a.streaming.liveSyncMinLatency||0;var e=Math.abs((a.streaming.liveSyncMaxLatency||
1)-d)/2;a.streaming.liveSync=a.streaming.liveSync||{};a.streaming.liveSync.targetLatency=d+e;a.streaming.liveSync.targetLatencyTolerance=e}a.streaming&&"liveSyncMaxLatency"in a.streaming&&(bd("streaming.liveSyncMaxLatency","Please Use streaming.liveSync.targetLatency and streaming.liveSync.targetLatencyTolerance instead. Or, set the values in your DASH manifest"),delete a.streaming.liveSyncMaxLatency);a.streaming&&"liveSyncMinLatency"in a.streaming&&(bd("streaming.liveSyncMinLatency","Please Use streaming.liveSync.targetLatency and streaming.liveSync.targetLatencyTolerance instead. Or, set the values in your DASH manifest"),
delete a.streaming.liveSyncMinLatency);a.streaming&&"liveSyncTargetLatency"in a.streaming&&(bd("streaming.liveSyncTargetLatency","Please Use streaming.liveSync.targetLatency instead."),a.streaming.liveSync=a.streaming.liveSync||{},a.streaming.liveSync.targetLatency=a.streaming.liveSyncTargetLatency,delete a.streaming.liveSyncTargetLatency);a.streaming&&"liveSyncTargetLatencyTolerance"in a.streaming&&(bd("streaming.liveSyncTargetLatencyTolerance","Please Use streaming.liveSync.targetLatencyTolerance instead."),
a.streaming.liveSync=a.streaming.liveSync||{},a.streaming.liveSync.targetLatencyTolerance=a.streaming.liveSyncTargetLatencyTolerance,delete a.streaming.liveSyncTargetLatencyTolerance);a.streaming&&"liveSyncPlaybackRate"in a.streaming&&(bd("streaming.liveSyncPlaybackRate","Please Use streaming.liveSync.maxPlaybackRate instead."),a.streaming.liveSync=a.streaming.liveSync||{},a.streaming.liveSync.maxPlaybackRate=a.streaming.liveSyncPlaybackRate,delete a.streaming.liveSyncPlaybackRate);a.streaming&&"liveSyncMinPlaybackRate"in
a.streaming&&(bd("streaming.liveSyncMinPlaybackRate","Please Use streaming.liveSync.minPlaybackRate instead."),a.streaming.liveSync=a.streaming.liveSync||{},a.streaming.liveSync.minPlaybackRate=a.streaming.liveSyncMinPlaybackRate,delete a.streaming.liveSyncMinPlaybackRate);a.streaming&&"liveSyncPanicMode"in a.streaming&&(bd("streaming.liveSyncPanicMode","Please Use streaming.liveSync.panicMode instead."),a.streaming.liveSync=a.streaming.liveSync||{},a.streaming.liveSync.panicMode=a.streaming.liveSyncPanicMode,
delete a.streaming.liveSyncPanicMode);a.streaming&&"liveSyncPanicThreshold"in a.streaming&&(bd("streaming.liveSyncPanicThreshold","Please Use streaming.liveSync.panicThreshold instead."),a.streaming.liveSync=a.streaming.liveSync||{},a.streaming.liveSync.panicThreshold=a.streaming.liveSyncPanicThreshold,delete a.streaming.liveSyncPanicThreshold);if(a.mediaSource&&"sourceBufferExtraFeatures"in a.mediaSource){bd("mediaSource.sourceBufferExtraFeatures configuration","Please Use mediaSource.addExtraFeaturesToSourceBuffer() instead.");
var f=a.mediaSource.sourceBufferExtraFeatures;a.mediaSource.addExtraFeaturesToSourceBuffer=function(){return f};delete a.mediaSource.sourceBufferExtraFeatures}a.manifest&&a.manifest.hls&&"useSafariBehaviorForLive"in a.manifest.hls&&(bd("manifest.hls.useSafariBehaviorForLive configuration","Please Use liveSync config to keep on live Edge instead."),delete a.manifest.hls.useSafariBehaviorForLive);a.streaming&&"parsePrftBox"in a.streaming&&(bd("streaming.parsePrftBox configuration","Now fired without needing a configuration."),
delete a.streaming.parsePrftBox);a.manifest&&a.manifest.dash&&"enableAudioGroups"in a.manifest.dash&&(bd("manifest.dash.enableAudioGroups configuration","Please Use manifest.enableAudioGroups instead."),a.manifest.enableAudioGroups=a.manifest.dash.enableAudioGroups,delete a.manifest.dash.enableAudioGroups);a.streaming&&"dispatchAllEmsgBoxes"in a.streaming&&(bd("streaming.dispatchAllEmsgBoxes configuration","Please Use mediaSource.dispatchAllEmsgBoxes instead."),a.mediaSource=a.mediaSource||{},a.mediaSource.dispatchAllEmsgBoxes=
a.streaming.dispatchAllEmsgBoxes,delete a.streaming.dispatchAllEmsgBoxes);a.streaming&&"autoLowLatencyMode"in a.streaming&&(bd("streaming.autoLowLatencyMode configuration","Please Use streaming.lowLatencyMode instead."),a.streaming.lowLatencyMode=a.streaming.autoLowLatencyMode,delete a.streaming.autoLowLatencyMode);a.manifest&&a.manifest.dash&&"ignoreSupplementalCodecs"in a.manifest.dash&&(bd("manifest.dash.ignoreSupplementalCodecs configuration","Please Use manifest.ignoreSupplementalCodecs instead."),
a.manifest.ignoreSupplementalCodecs=a.manifest.dash.ignoreSupplementalCodecs,delete a.manifest.dash.ignoreSupplementalCodecs);a.manifest&&a.manifest.hls&&"ignoreSupplementalCodecs"in a.manifest.hls&&(bd("manifest.hls.ignoreSupplementalCodecs configuration","Please Use manifest.ignoreSupplementalCodecs instead."),a.manifest.ignoreSupplementalCodecs=a.manifest.hls.ignoreSupplementalCodecs,delete a.manifest.hls.ignoreSupplementalCodecs);a.manifest&&a.manifest.dash&&"updatePeriod"in a.manifest.dash&&
(bd("manifest.dash.updatePeriod configuration","Please Use manifest.updatePeriod instead."),a.manifest.updatePeriod=a.manifest.dash.updatePeriod,delete a.manifest.dash.updatePeriod);a.manifest&&a.manifest.hls&&"updatePeriod"in a.manifest.hls&&(bd("manifest.hls.updatePeriod configuration","Please Use manifest.updatePeriod instead."),a.manifest.updatePeriod=a.manifest.hls.updatePeriod,delete a.manifest.hls.updatePeriod);a.manifest&&a.manifest.dash&&"ignoreDrmInfo"in a.manifest.dash&&(bd("manifest.dash.ignoreDrmInfo configuration",
"Please Use manifest.ignoreDrmInfo instead."),a.manifest.ignoreDrmInfo=a.manifest.dash.ignoreDrmInfo,delete a.manifest.dash.ignoreDrmInfo);if(a.drm&&a.drm.advanced){d=!1;for(var g in a.drm.advanced){var h=a.drm.advanced[g];e=h.videoRobustness;h=h.audioRobustness;"videoRobustness"in a.drm.advanced[g]&&!Array.isArray(a.drm.advanced[g].videoRobustness)&&(a.drm.advanced[g].videoRobustness=[e],d=!0);"audioRobustness"in a.drm.advanced[g]&&!Array.isArray(a.drm.advanced[g].audioRobustness)&&(a.drm.advanced[g].audioRobustness=
[h],d=!0)}d&&bd("AdvancedDrmConfiguration's videoRobustness and audioRobustness","These properties are no longer strings but array of strings, please update your usage of these properties.")}a.streaming&&"forceHTTP"in a.streaming&&(bd("streaming.forceHTTP configuration","Please Use networking.forceHTTP instead."),a.networking=a.networking||{},a.networking.forceHTTP=a.streaming.forceHTTP,delete a.streaming.forceHTTP);a.streaming&&"forceHTTPS"in a.streaming&&(bd("streaming.forceHTTPS configuration",
"Please Use networking.forceHTTP instead."),a.networking=a.networking||{},a.networking.forceHTTPS=a.streaming.forceHTTPS,delete a.streaming.forceHTTPS);a.streaming&&"minBytesForProgressEvents"in a.streaming&&(bd("streaming.minBytesForProgressEvents configuration","Please Use networking.minBytesForProgressEvents instead."),a.networking=a.networking||{},a.networking.minBytesForProgressEvents=a.streaming.minBytesForProgressEvents,delete a.streaming.minBytesForProgressEvents);g=so(this.g,a,dr(this));
ss(this,c);return g};p.Ck=function(a){this.Fg=a};
function ss(a,b){a.Ue=new Fi(a.g,a.ra,a.F);if(a.I){var c=Kd(a.g.manifest);a.h&&a.h.nodeName==="AUDIO"&&(c.disableVideo=!0);a.I.configure(c)}a.F&&a.F.configure(a.g.drm);if(a.m){a.m.configure(a.g.streaming);try{a.l!=mr&&Hi(a.Ue,a.i)&&Sr(a)}catch(e){tr(a,e)}a.u&&Wr(a);c=a.m.u;!c||c.allowedByApplication&&c.allowedByKeySystem||ir(a)}a.M&&a.M.configure(a.g.networking);a.H&&(a.H.configure(a.g.mediaSource),a.H.Fa=a.g.manifest.segmentRelativeVttTiming);a.A&&Lr(a);a.u&&(a.u.configure(a.g.abr),a.g.abr.enabled?
a.u.enable():a.u.disable(),gs(a));a.P&&rs(a);a.La&&(a.g.streaming.rebufferingGoal?a.La.xa(.25):a.La.stop());a.i&&Xr(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.D&&a.D.configure(a.g.ads);a.K&&a.K.configure(a.g.cmcd);a.oa&&a.oa.configure(a.g.cmsd);a.sa&&a.sa.configure(a.g.queue);if(a.l==Pr&&a.J.getConfiguration){c=a.J.getConfiguration();var d=!1;b.preferredVideoHdrLevel!=a.g.preferredVideoHdrLevel&&c.hdrLevel!=a.g.preferredVideoHdrLevel&&(c.hdrLevel=a.g.preferredVideoHdrLevel,d=
!0);b.preferredVideoLayout!=a.g.preferredVideoLayout&&c.videoLayout!=a.g.preferredVideoLayout&&(c.videoLayout=a.g.preferredVideoLayout,d=!0);b.preferSpatialAudio!=a.g.preferSpatialAudio&&c.spatialAudio!=a.g.preferSpatialAudio&&(c.spatialAudio=a.g.preferSpatialAudio,d=!0);b.preferredVideoRole!=a.g.preferredVideoRole&&c.videoRole!=a.g.preferredVideoRole&&(c.videoRole=a.g.preferredVideoRole,d=!0);d&&(a.J.configure(c),ir(a))}}p.getConfiguration=function(){var a=dr(this);so(a,this.g,dr(this));return a};
p.Ok=function(){return this.Fg};p.$i=function(){var a=dr(this);so(a,this.g,dr(this));return Tn(this.g,dr(this))};p.Xi=function(){if(this.h){var a=this.h.buffered.length;a=a?this.h.buffered.end(a-1):0;var b=this.getConfiguration().streaming.bufferingGoal;b=Math.min(this.h.currentTime+b,this.wa().end);if(a>=b)return 1;if(!(a<=this.h.currentTime)&&a<b)return(a-this.h.currentTime)/(b-this.h.currentTime)}return 0};
p.Hj=function(){var a=this.getConfiguration(),b;for(b in this.g)delete this.g[b];so(this.g,dr(this),dr(this));ss(this,a)};p.Zk=function(){return this.l};p.wh=function(){return this.i?this.i.type:null};p.jl=function(){return this.h};p.Xb=function(){return this.M};p.kd=function(){return this.V};p.vf=function(){return this.D?this.D:null};p.xf=function(){return this.sa?this.sa:null};
p.U=function(){return this.i&&!this.Da()?this.i.presentationTimeline.U():this.h&&(this.h.src||this.Da())?this.h.duration==Infinity:!1};p.md=function(){return this.i?this.i.presentationTimeline.md():!1};p.Md=function(){if(this.i&&!this.Da()){var a=this.i.variants;return a.length?!a[0].video:!1}return this.h&&(this.h.src||this.Da())?this.h.videoTracks?this.h.videoTracks.length==0:this.h.videoHeight==0:!1};
p.Hf=function(){if(this.i&&!this.Da()){var a=this.i.variants;if(!a.length)return!1;a=a[0];return a.audio||!a.video?!1:!a.video.codecs.includes(",")}return this.h&&(this.h.src||this.Da())&&this.h.audioTracks?this.h.audioTracks.length==0:!1};
p.wa=function(){if(this.i&&!this.Da()){if(!this.Z&&this.i.type=="HLS")return{start:0,end:0};var a=this.i.presentationTimeline;return{start:a.jc(),end:a.Ob()}}if(this.h&&(this.h.src||this.Da())&&(a=this.h.seekable)&&a.length){var b=this.g?this.g.playRangeStart:0;b=Math.max(a.start(0),b);var c=this.g?this.g.playRangeEnd:Infinity;a=Math.min(a.end(a.length-1),c);return{start:b,end:a}}return{start:0,end:0}};p.Hl=function(){this.U()&&(this.h.currentTime=this.wa().end)};p.Ml=function(){return this.Z};
p.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};p.drmInfo=function(){return this.F?this.F.h:null};p.qe=function(){return this.F?this.F.qe():Infinity};p.ph=function(){return this.F?this.F.ph():[]};p.wf=function(){return this.F?this.F.wf():{}};p.Ef=function(){return this.P?this.P.g==Di:!!this.V};p.Za=function(){return this.h?this.L?this.L.i:1:0};p.zi=function(a){this.l==Pr&&this.m&&kn(this.m,a)};
p.uc=function(a,b){b=b===void 0?!0:b;a==0?bb("A trick play rate of 0 is unsupported!"):(this.L.set(a),this.l==Pr&&(this.u.playbackRateChanged(a),this.zi(b&&a!=1)),Qr(this,a))};p.Cd=function(){var a=this.L.ld();this.l==Tr&&this.L.set(a);this.l==Pr&&(this.L.set(a),this.u.playbackRateChanged(a),this.zi(!1));this.mc.Sa()};
p.Qb=function(){if(this.i&&!this.Da()){for(var a=this.m?this.m.u:null,b=[],c=0,d=u(this.i.variants),e=d.next();!e.done;e=d.next())if(e=e.value,og(e)){var f=gg(e);f.active=e==a;f.active||c==1||a==null||e.video!=a.video||e.audio!=a.audio||(f.active=!0);f.active&&c++;b.push(f)}return b}if(this.h&&this.h.audioTracks){var g=ts(this);a=Array.from(this.h.audioTracks);return a.length?a.map(function(h){return ng(h,g)}):g?[ng(null,g)]:[]}return[]};
p.Bc=function(){if(this.i){if(this.Da())return[];for(var a=this.m?this.m.C:null,b=[],c=u(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=hg(d);e.active=d==a;b.push(e)}return b}return this.h&&this.h.src&&this.h.textTracks?ks(this).map(function(f){return mg(f)}):[]};p.sh=function(){var a=this.$e;this.i&&(a=this.i.imageStreams);return a.map(function(b){return ig(b)})};
p.Fk=function(a){var b=this,c,d;return Q(function(e){if(e.g==1)return E(e,us(b,a),2);c=e.h;if(!c)return e.return(null);d=[];c.segmentIndex.Nb(function(f){var g=vs(f.tilesLayout||c.tilesLayout);if(g)for(var h=g.rows*g.columns,k=f.j-f.startTime,l=0;l<h;l++){var m=ws(f,c,f.startTime+k*l/h,g);d.push(m)}});c.closeSegmentIndex&&c.closeSegmentIndex();return e.return(d)})};function vs(a){return a?(a=/(\d+)x(\d+)/.exec(a))?{columns:parseInt(a[1],10),rows:parseInt(a[2],10)}:null:null}
p.bj=function(a,b){var c=this,d,e,f,g,h,k;return Q(function(l){if(l.g==1)return E(l,us(c,a),2);d=l.h;if(!d)return l.return(null);d.closeSegmentIndex&&(c.Gc.has(d)||(e=new Gf(function(){d.closeSegmentIndex();c.Gc.delete(d)}),c.Gc.set(d,e)),f=c.Gc.get(d),f.Y(5));g=d.segmentIndex.find(b);if(g==null)return l.return(null);h=d.segmentIndex.get(g);return(k=vs(h.tilesLayout||d.tilesLayout))?l.return(ws(h,d,b,k)):l.return(null)})};
function us(a,b){var c,d;return Q(function(e){if(e.g==1){if(a.l!=Pr&&a.l!=Tr)return e.return(null);c=a.$e;a.i&&(c=a.i.imageStreams);d=c[0];if(!d)return e.return(null);b!=null&&(d=c.find(function(f){return f.id==b}));return d?d.segmentIndex?e.B(2):E(e,d.createSegmentIndex(),2):e.return(null)}return e.return(d)})}
function ws(a,b,c,d){var e=b.width||0,f=b.height||0,g=e/d.columns,h=f/d.rows,k=d.columns*d.rows,l=a.j-a.startTime;l=a.C||l/k;var m=a.startTime,n=0,q=0;k>1&&(q=Math.floor((c-a.startTime)/l),m=a.startTime+q*l,n=q%d.columns*g,q=Math.floor(q/d.columns)*h);d=!1;if(c=a.thumbnailSprite)d=!0,h=c.height,n=c.positionX,q=c.positionY,g=c.width;return{segment:a,imageHeight:f,imageWidth:e,height:h,positionX:n,positionY:q,startTime:m,duration:l,uris:a.S(),startByte:a.Uc(),endByte:a.Sc(),width:g,sprite:d,mimeType:a.mimeType||
b.mimeType,codecs:a.codecs||b.codecs}}
p.hg=function(a){function b(){var d=c.i.textStreams.find(function(e){return e.id==a.id});d&&d!=c.m.C&&(xo(c.C.h,d,!1),nn(c.m,d),Rr(c),fs(c),c.Wd=d.language)}var c=this;if(this.i&&this.G&&(b(),!this.Da()))return;(function(){if(c.h&&c.h.textTracks){var d=ks(c),e=d.find(function(h){return kg(h)===a.id});if(e){if(c.A instanceof pp){d=u(d);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=f===e?c.W?"showing":"hidden":"disabled";f.mode!==g&&(f.mode=g)}}else d=d.find(function(h){return h.mode!=="disabled"}),
d!==e&&(d&&(d.mode="disabled",c.j.Ea(d,"cuechange"),c.A.remove(0,Infinity)),e&&ns(c,e));Rr(c);fs(c)}}})()};
function ns(a,b){a.j.o(b,"cuechange",function(){a.A.remove(0,Math.max(0,a.h.currentTime-a.g.streaming.bufferBehind));var c={periodStart:0,segmentStart:0,segmentEnd:a.h.duration,vttOffset:0},d=[],e=Array.from(b.activeCues||[]);e=u(e);for(var f=e.next();!f.done;f=e.next()){f=f.value;if(f.endTime===Infinity||f.endTime<f.startTime)f=null;else{var g=new ue(f.startTime,f.endTime,f.text);g.line=typeof f.line==="number"?f.line:null;f.lineAlign&&(g.lineAlign=f.lineAlign);g.lineInterpretation=f.snapToLines?
ze:1;g.position=typeof f.position==="number"?f.position:null;f.positionAlign&&(g.positionAlign=f.positionAlign);g.size=f.size;g.textAlign=f.align;f.vertical==="lr"?g.writingMode="vertical-lr":f.vertical==="rl"&&(g.writingMode="vertical-rl");f.region&&(g.region.id=f.region.id,g.region.height=f.region.lines,g.region.heightUnits=2,g.region.regionAnchorX=f.region.regionAnchorX,g.region.regionAnchorY=f.region.regionAnchorY,g.region.scroll=f.region.scroll,g.region.viewportAnchorX=f.region.viewportAnchorX,
g.region.viewportAnchorY=f.region.viewportAnchorY,g.region.viewportAnchorUnits=yd,g.region.width=f.region.width,g.region.widthUnits=yd);Ge(g);f=g}f&&((g=a.g.mediaSource.modifyCueCallback)&&g(f,null,c),d.push(f))}a.A.append(d)});b.mode=document.pictureInPictureElement?"showing":"hidden"}
p.Je=function(a,b,c){function d(){var f=e.i.variants.find(function(h){return h.id==a.id});if(f&&og(f)){var g=e.m.u;e.g.abr.enabled&&(g.video!=f.video||g.audio&&f.audio&&g.audio.language==f.audio.language&&g.audio.channelsCount==f.audio.channelsCount&&g.audio.label==f.audio.label)&&bb("Changing tracks while abr manager is enabled will likely result in the selected track being overridden. Consider disabling abr before calling selectVariantTrack().");e.Da()?Yr(e,f,!1,!1,0):Yr(e,f,!1,b||!1,c||0);e.J.configure({language:f.language,
role:f.audio&&f.audio.roles&&f.audio.roles[0]||"",videoRole:f.video&&f.video.roles&&f.video.roles[0]||"",channelCount:f.audio&&f.audio.channelsCount?f.audio.channelsCount:0,hdrLevel:f.video&&f.video.hdr?f.video.hdr:"",spatialAudio:f.audio&&f.audio.spatialAudio?f.audio.spatialAudio:!1,videoLayout:f.video&&f.video.videoLayout?f.video.videoLayout:"",audioLabel:f.audio&&f.audio.label?f.audio.label:"",videoLabel:f.video&&f.video.label?f.video.label:"",codecSwitchingStrategy:e.g.mediaSource.codecSwitchingStrategy,
audioCodec:f.audio&&f.audio.codecs?f.audio.codecs:"",activeAudioCodec:g.audio&&g.audio.codecs?g.audio.codecs:"",activeAudioChannelCount:g.audio&&g.audio.channelsCount?g.audio.channelsCount:0,preferredAudioCodecs:e.g.preferredAudioCodecs,preferredAudioChannelCount:e.g.preferredAudioChannelCount});Wr(e)}}var e=this;b=b===void 0?!1:b;c=c===void 0?0:c;if(this.i&&this.G&&(d(),!this.Da()))return;(function(){if(a.originalAudioId&&e.h&&e.h.audioTracks){var f=Array.from(e.h.audioTracks);f=u(f);for(var g=f.next();!g.done;g=
f.next())if(g=g.value,kg(g)==a.id){xs(e,g);break}}})()};
p.Nj=function(a,b){function c(){var e=d.J.getConfiguration();e.audioCodec=a.codecs||"";e.audioLabel=a.label||"";e.channelCount=a.channelsCount||0;e.language=a.language;e.role=a.roles[0]||"";e.spatialAudio=a.spatialAudio;d.J.configure(e);ir(d,!0,b,!1,!1)}var d=this;b=b===void 0?0:b;if(this.i&&this.G&&(c(),!this.Da()))return;(function(){if(d.h&&d.h.audioTracks){var e=Bc(a.language),f=Array.from(d.h.audioTracks),g=null;f=u(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=h.language||"und";if(h.label==
a.label&&Bc(k)==e&&h.kind==a.roles[0]){g=h;break}}g&&xs(d,g)}})()};
p.getAudioTracks=function(){if(this.i&&!this.Da()){var a=this.Qb();if(!a.length)return[];var b=a.find(function(f){return f.active});if(!b)return[];var c=a;this.l!=Pr||this.Da()||(c=a.filter(function(f){return f.originalVideoId===b.originalVideoId&&(f.audioCodec||hf.includes(f.audioMimeType||""))}));if(!c.length)return[];a=new Map;c=u(c);for(var d=c.next();!d.done;d=c.next()){d=d.value;var e=d.originalAudioId;e||d.audioId==null||(e=String(d.audioId));!e&&d.codecs.includes(",")&&d.audioCodec&&(e="muxed-in-video");
e&&(e+=[d.language,d.label,d.channelsCount,d.spatialAudio,d.audioCodec||""].join("_"),a.set(e,{active:d.active,language:d.language,label:d.label,mimeType:d.audioMimeType,codecs:d.audioCodec,primary:d.primary,roles:d.audioRoles||[],accessibilityPurpose:d.accessibilityPurpose,channelsCount:d.channelsCount,audioSamplingRate:d.audioSamplingRate,spatialAudio:d.spatialAudio,originalLanguage:d.originalLanguage}))}return Array.from(a.values())}return this.h&&this.h.audioTracks?Array.from(this.h.audioTracks).map(function(f){var g=
f.language;g={active:f.enabled,language:Bc(g||"und"),label:f.label,mimeType:null,codecs:null,primary:f.kind=="main",roles:[],accessibilityPurpose:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,originalLanguage:g};f.kind&&g.roles.push(f.kind);f.configuration&&(f.configuration.codec&&(g.codecs=f.configuration.codec),f.configuration.sampleRate&&(g.audioSamplingRate=f.configuration.sampleRate),f.configuration.numberOfChannels&&(g.channelsCount=f.configuration.numberOfChannels));return g}):
[]};
p.Oj=function(a,b,c){b=b===void 0?!1:b;c=c===void 0?0:c;var d=this.Qb();if(d.length){var e=d.find(function(g){return g.active});if(e){d=d.filter(function(g){return(g.videoBandwidth||g.bandwidth)==a.bandwidth&&g.width==a.width&&g.height==a.height&&g.frameRate==a.frameRate&&g.pixelAspectRatio==a.pixelAspectRatio&&g.hdr==a.hdr&&g.colorGamut==a.colorGamut&&g.videoLayout==a.videoLayout&&g.videoMimeType==a.mimeType&&g.videoCodec==a.codecs&&Vc(g.videoRoles,a.roles)&&g.videoLabel==a.label});var f;d.length==1?
f=d[0]:f=d.find(function(g){return g.audioId===e.audioId});f||(f=d.find(function(g){return g.language==e.language&&g.label===e.label&&g.channelsCount===e.channelsCount&&g.spatialAudio===e.spatialAudio&&g.audioMimeType===e.audioMimeType&&mf(g.audioCodec||"")===mf(e.audioCodec||"")&&Vc(g.audioRoles,e.audioRoles)}));f&&!f.active&&this.Je(f,b,c)}}};
p.getVideoTracks=function(){if(this.l==Tr||this.Da())return[];var a=this.Qb();if(!a.length)return[];var b=a.find(function(f){return f.active});if(!b)return[];var c=a;this.Hf()||(c=a.filter(function(f){return f.videoCodec&&f.audioGroupId===b.audioGroupId&&f.originalAudioId===b.originalAudioId?f.audioId===b.audioId?!0:f.language===b.language&&f.label===b.label&&f.channelsCount===b.channelsCount&&f.spatialAudio===b.spatialAudio&&f.audioMimeType===b.audioMimeType&&mf(f.audioCodec||"")===mf(b.audioCodec||
"")&&Vc(f.audioRoles,b.audioRoles):!1}));if(!c.length)return[];a=new Map;c=u(c);for(var d=c.next();!d.done;d=c.next()){d=d.value;var e=d.originalVideoId;e||d.videoId==null||(e=String(d.videoId));e&&a.set(e,{active:d.active,bandwidth:d.videoBandwidth||d.bandwidth,width:d.width,height:d.height,frameRate:d.frameRate,pixelAspectRatio:d.pixelAspectRatio,hdr:d.hdr,colorGamut:d.colorGamut,videoLayout:d.videoLayout,mimeType:d.videoMimeType,codecs:d.videoCodec,roles:d.videoRoles||[],label:d.videoLabel})}return Array.from(a.values())};
p.Hk=function(){return ys(this.Qb())};p.yl=function(){return ys(this.Bc())};p.Gk=function(){return Array.from(zs(this.Qb()))};p.xl=function(){return Array.from(zs(this.Bc()))};
p.Mj=function(a,b,c,d,e,f,g){function h(){function l(t,v){return t.video||v.video?t.video&&v.video?Math.abs((t.video.height||0)-(v.video.height||0))+Math.abs((t.video.width||0)-(v.video.width||0)):Infinity:0}var m=k.m.u;k.J=k.g.adaptationSetCriteriaFactory();k.J.configure({language:a,role:b||"",videoRole:m.video&&m.video.roles&&m.video.roles[0]||"",channelCount:c||0,hdrLevel:"",spatialAudio:f||!1,videoLayout:"",audioLabel:g||"",videoLabel:"",codecSwitchingStrategy:k.g.mediaSource.codecSwitchingStrategy,
audioCodec:e||"",activeAudioCodec:m.audio&&m.audio.codecs?m.audio.codecs:"",activeAudioChannelCount:m.audio&&m.audio.channelsCount?m.audio.channelsCount:0,preferredAudioCodecs:k.g.preferredAudioCodecs,preferredAudioChannelCount:k.g.preferredAudioChannelCount});var n=k.J.create(k.i.variants),q=null;n=u(n.values());for(var r=n.next();!r.done;r=n.next())r=r.value,og(r)&&(!q||l(q,m)>l(r,m))&&(q=r);q!=m&&(q?(m=gg(q),k.Je(m,!0,d||0)):ir(k))}var k=this;c=c===void 0?0:c;d=d===void 0?0:d;e=e===void 0?"":e;
f=f===void 0?!1:f;g=g===void 0?"":g;if(this.i&&this.G&&(h(),!this.Da()))return;(function(){if(k.h&&k.h.audioTracks){var l=qg(k.Qb(),a,b||"",!1)[0];l&&k.Je(l)}})()};p.ai=function(a,b,c){function d(){e.Wd=a;e.fe=b||"";e.ee=c||!1;var f=qg(e.i.textStreams,e.Wd,e.fe,e.ee)[0]||null;f&&f!=e.m.C&&(xo(e.C.h,f,!1),e.g.streaming.alwaysStreamText||e.Yc())&&(nn(e.m,f),Rr(e),fs(e))}var e=this;c=c===void 0?!1:c;if(this.i&&this.G&&(d(),!this.Da()))return;(function(){var f=qg(e.Bc(),a,b||"",c||!1)[0];f&&e.hg(f)})()};
p.ym=function(a,b,c){function d(){for(var f=null,g=u(e.i.variants),h=g.next();!h.done;h=g.next())if(h=h.value,h.audio.label==a){f=h;break}f!=null&&(e.J=e.g.adaptationSetCriteriaFactory(),e.J.configure({language:f.language,role:"",videoRole:"",channelCount:0,hdrLevel:"",spatialAudio:!1,videoLayout:"",videoLabel:"",audioLabel:a,codecSwitchingStrategy:e.g.mediaSource.codecSwitchingStrategy,audioCodec:"",activeAudioCodec:"",activeAudioChannelCount:0,preferredAudioCodecs:e.g.preferredAudioCodecs,preferredAudioChannelCount:e.g.preferredAudioChannelCount}),
ir(e,b,c))}var e=this;b=b===void 0?!0:b;c=c===void 0?0:c;if(this.i&&this.G&&(d(),!this.Da()))return;(function(){if(e.h&&e.h.audioTracks){var f=Array.from(e.h.audioTracks),g=null;f=u(f);for(var h=f.next();!h.done;h=f.next())h=h.value,h.label==a&&(g=h);g&&xs(e,g)}})()};p.Yc=function(){var a=this.W;return this.A?this.A.isTextVisible():a};p.Lk=function(){return this.ib.map(function(a){return hg(a)})};
p.Kk=function(a){bd("getChapters","Please use an getChaptersAsync.");if(!this.ib.length)return[];var b=Bc(a);a=this.ib.filter(function(f){return Bc(f.language)==b});if(!a.length)return[];var c=[],d=new Set;a=u(a);for(var e=a.next();!e.done;e=a.next())e=e.value,e.segmentIndex&&e.segmentIndex.Nb(function(f){var g=f.S()[0],h=f.startTime+"-"+f.endTime+"-"+g;f={id:h,title:g,startTime:f.startTime,endTime:f.endTime};d.has(h)||(c.push(f),d.add(h))});return c};
p.qh=function(a){var b=this,c,d,e,f,g,h,k;return Q(function(l){switch(l.g){case 1:if(!b.ib.length)return l.return([]);c=Bc(a);d=b.ib.filter(function(m){return Bc(m.language)==c});if(!d.length)return l.return([]);e=[];f=new Set;g=u(d);h=g.next();case 2:if(h.done){l.B(4);break}k=h.value;if(k.segmentIndex){l.B(5);break}return E(l,k.createSegmentIndex(),5);case 5:k.segmentIndex.Nb(function(m){var n=m.S()[0],q=m.startTime+"-"+m.endTime+"-"+n;m={id:q,title:n,startTime:m.startTime,endTime:m.endTime};f.has(q)||
(e.push(m),f.add(q))});h=g.next();l.B(2);break;case 4:return l.return(e)}})};function ks(a){return Array.from(a.h.textTracks).filter(function(b){return b.kind!="metadata"&&b.kind!="chapters"&&b.label!="Shaka Player TextTrack"})}function ls(a){return Array.from(a.h.textTracks).find(function(b){return b.label=="Shaka Player TextTrack"})}function ps(a){return Array.from(a.h.textTracks).filter(function(b){return b.kind=="metadata"})}
p.$d=function(a){a=!!a;this.W!=a&&(this.W=a,this.l==Pr?(this.A.setTextVisibility(a),this.g.streaming.alwaysStreamText||(a?this.m.C||(a=qg(this.i.textStreams,this.Wd,this.fe,this.ee),a.length>0&&(nn(this.m,a[0]),Rr(this),fs(this))):jn(this.m))):this.h&&this.h.src&&this.h.textTracks&&this.A.setTextVisibility(a),es(this))};
p.kl=function(){if(this.G)var a=this.G.bf();else{if(this.O==null)return new Date;if(this.O instanceof Date)return this.O;a=this.O}if(this.i&&!this.Da()){var b=this.i.presentationTimeline;return new Date(((b.m||b.i)+a)*1E3)}return this.h&&this.h.getStartDate?(b=this.h.getStartDate(),isNaN(b.getTime())?null:new Date(b.getTime()+a*1E3)):null};
p.aj=function(){if(this.i&&!this.Da()){var a=this.i.presentationTimeline;a=a.m||a.i;return a===null?null:new Date(a*1E3)}return this.h&&this.h.getStartDate?(a=this.h.getStartDate(),isNaN(a.getTime())?null:a):null};p.zf=function(){return this.U()?this.i?this.i.presentationTimeline.zf():null:null};p.Rc=function(){if(this.l==Pr)return this.H.Rc();var a={total:[],audio:[],video:[],text:[]};this.l==Tr&&(a.total=Tj(this.h.buffered));return a};
function Tq(a){if(!a.h||!a.h.currentTime)return null;var b=a.aj();return b?Math.floor(Date.now()-(b.getTime()+a.h.currentTime*1E3)):null}p.getBandwidthEstimate=function(){return this.u?this.u.getBandwidthEstimate():NaN};
p.getStats=function(){if(this.l!=Pr&&this.l!=Tr)return{width:NaN,height:NaN,currentCodecs:"",streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,stallsDetected:NaN,gapsJumped:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,manifestSizeBytes:NaN,bytesDownloaded:NaN,nonFatalErrorCount:NaN,manifestPeriodCount:NaN,manifestGapCount:NaN,
switchHistory:[],stateHistory:[]};Or(this);var a=this.h,b=a.currentTime/a.duration;isNaN(b)||this.U()||Bo(this.C,Math.round(100*b));this.G&&(this.C.R=this.G.Ai(),this.C.T=this.G.Ci());a.getVideoPlaybackQuality&&(b=a.getVideoPlaybackQuality(),zo(this.C,Number(b.droppedVideoFrames),Number(b.totalVideoFrames)),this.C.M=Number(b.corruptedVideoFrames));this.C.u=this.F?mi(this.F):NaN;Ao(this.C,a.videoWidth||NaN,a.videoHeight||NaN);this.C.l="";this.U()&&(a=Tq(this),a!=null&&(this.C.F=a/1E3));b=this.Qb().find(function(e){return e.active});
a=this.Bc().find(function(e){return e.active});if(b){if(b.bandwidth){var c=this.L?this.L.i:1,d=c*b.bandwidth;a&&a.bandwidth&&(d+=c*a.bandwidth);this.C.C=d}b.width&&b.height&&Ao(this.C,b.width||NaN,b.height||NaN);b=b.codecs;a&&(b+=","+(a.codecs||a.mimeType));b&&(this.C.l=b)}this.l!=Pr||this.Da()||(this.i&&(this.C.I=this.i.periodCount,this.C.H=this.i.gapCount,this.i.presentationTimeline&&(this.C.K=this.i.presentationTimeline.h)),a=this.u.getBandwidthEstimate(),this.C.A=a);this.l==Tr&&Co(this.C,NaN);
return Do(this.C)};
p.ie=function(a,b,c,d,e,f,g){g=g===void 0?!1:g;var h=this,k,l,m,n,q,r,t,v,w,z,y,A;return Q(function(C){switch(C.g){case 1:if(h.l!=Pr&&h.l!=Tr)throw new U(1,7,7004);c!="subtitles"&&c!="captions"&&bb("Using a kind value different of `subtitles` or `captions` can cause unwanted issues.");if(d){C.B(2);break}return E(C,As(h,a),3);case 3:d=C.h;case 2:k=[];h.D&&(k=h.D.getCuePoints());if(h.l!=Tr){C.B(4);break}l=Tb();g&&l.Ja()==="WEBKIT"&&(c="forced");return E(C,Bs(h,a,b,c,d,f||"",k),5);case 5:m=C.h;if(m.track)return Sr(h),
Rr(h),C.return(mg(m.track));throw new U(1,2,2012);case 4:n=xc;q=h.wa();r=q.end-q.start;h.i&&(r=h.i.presentationTimeline.getDuration());if(r==Infinity)throw new U(1,4,4033);if(!k.length){C.B(6);break}return E(C,Cs(h,a),7);case 7:t=C.h,v=Ds(h,t,d,k),w=new Blob([v],{type:"text/vtt"}),a=Lk(w),d="text/vtt";case 6:z={id:h.Ve++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:om(0,r,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,
language:b,originalLanguage:b,label:f||null,type:n.Va,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([gf(d||"",e||"")]),isAudioMuxedInVideo:!1,baseOriginalId:null};y=gf(z.mimeType,z.codecs);A=wf(y);if(!A)throw new U(2,2,2014,d);h.i.textStreams.push(z);Sr(h);Rr(h);return C.return(hg(z))}})};
p.hf=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,q,r,t,v,w,z,y,A,C;return Q(function(F){switch(F.g){case 1:if(c.l!=Pr&&c.l!=Tr)throw new U(1,7,7004);if(b){F.B(2);break}return E(F,As(c,a),3);case 3:b=F.h;case 2:if(b!="text/vtt")throw new U(1,2,2017,a);d=xc;e=c.wa();f=e.end-e.start;c.i&&(f=c.i.presentationTimeline.getDuration());if(f==Infinity)throw new U(1,4,4045);return E(F,Cs(c,a),4);case 4:g=F.h;h=vf(b);if(!h)throw new U(2,2,2014,b);k=h();l={periodStart:0,segmentStart:0,segmentEnd:f,vttOffset:0};
m=Lb(g);n=k.parseMedia(m,l,a,[]);q=[];r=u(n);t=r.next();for(v={};!t.done;v={yg:void 0,Fd:void 0},t=r.next())v.Fd=t.value,v.yg=null,w=function(D){return function(){D.yg==null&&(D.yg=pc([a],[D.Fd.payload]));return D.yg||[]}}(v),z=new Jj(v.Fd.startTime,v.Fd.endTime,w,0,null,null,0,0,Infinity),v.Fd.payload.includes("#xywh")&&(y=v.Fd.payload.split("#xywh=")[1].split(","),y.length===4&&z.lg({height:parseInt(y[3],10),positionX:parseInt(y[0],10),positionY:parseInt(y[1],10),width:parseInt(y[2],10)})),q.push(z);
A=b;if(!q.length){F.B(5);break}return E(F,As(c,q[0].S()[0]),6);case 6:A=F.h;case 5:return C={id:c.Ve++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new mm(q),mimeType:A||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:d.Ag,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,
tilesLayout:"1x1",accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([gf(A||"","")]),isAudioMuxedInVideo:!1,baseOriginalId:null},c.l==Tr?c.$e.push(C):c.i.imageStreams.push(C),Sr(c),F.return(ig(C))}})};
p.gf=function(a,b,c){var d=this,e,f,g,h,k,l,m,n,q,r,t,v,w,z,y;return Q(function(A){switch(A.g){case 1:if(d.l!=Pr&&d.l!=Tr)throw new U(1,7,7004);if(c){A.B(2);break}return E(A,As(d,a),3);case 3:c=A.h;case 2:e=xc;f=d.wa();g=f.end-f.start;d.i&&(g=d.i.presentationTimeline.getDuration());if(g==Infinity)throw new U(1,4,4055);h=vf(c);if(!h)throw new U(2,2,2014,c);return E(A,Cs(d,a),4);case 4:k=A.h;l=h();m={periodStart:0,segmentStart:0,segmentEnd:g,vttOffset:0};n=Lb(k);q=l.parseMedia(n,m,a,[]);r=[];t=u(q);
v=t.next();for(w={};!v.done;w={rf:void 0},v=t.next())w.rf=v.value,z=new Jj(w.rf.startTime,w.rf.endTime,function(C){return function(){return[C.rf.payload]}}(w),0,null,null,0,0,Infinity),r.push(z);y={id:d.Ve++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new mm(r),mimeType:"text/plain",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:b,originalLanguage:b,label:null,type:e.Va,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,
roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([gf("text/plain","")]),isAudioMuxedInVideo:!1,baseOriginalId:null};d.ib.push(y);Sr(d);return A.return(hg(y))}})};
function As(a,b){var c;return Q(function(d){switch(d.g){case 1:return sa(d,2),E(d,bp(b,a.M,a.g.streaming.retryParameters),4);case 4:c=d.h;ua(d,3);break;case 2:va(d);case 3:if(c)return d.return(c);throw new U(1,2,2011,b);}})}
function Bs(a,b,c,d,e,f,g){var h,k,l,m;return Q(function(n){if(n.g==1)return e!="text/vtt"||g.length?E(n,Cs(a,b),3):n.B(2);n.g!=2&&(h=n.h,k=Ds(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=Lk(l),e="text/vtt");m=document.createElement("track");a:{var q=a.K,r=b;try{if(!q.g.enabled){var t=r;break a}var v=Sp(q);v.ot=Mq;v.su=!0;var w=Wp(v);t=Xp(r,w);break a}catch(z){cb("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",z);t=r;break a}t=void 0}m.src=t;m.label=f;m.kind=d;m.srclang=c;a.h.getAttribute("crossorigin")||
a.h.setAttribute("crossorigin","anonymous");a.h.appendChild(m);a.Eg.push(m);return n.return(m)})}function Cs(a,b){var c,d,e,f;return Q(function(g){if(g.g==1){c=ph;d=a.g.streaming.retryParameters;e=jh([b],d);e.method="GET";var h=a.K;try{h.g.enabled&&Bq(h,e,{ot:Mq,su:!0})}catch(k){cb("CMCD_TEXT_ERROR","Could not generate text CMCD data.",k)}return E(g,a.M.request(c,e).promise,2)}f=g.h;return g.return(f.data)})}
function Ds(a,b,c,d){var e=vf(c);if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.h.duration,vttOffset:0},b=Lb(b),b=c.parseMedia(b,a,null,[]),Ep(b,d);throw new U(2,2,2014,c);}p.Em=function(a,b){this.ra.width=a;this.ra.height=b};p.Xh=function(a){if(this.l==Pr){var b=this.m;a=a===void 0?.1:a;if(b.l.g)b=!1;else if(b.F)b=!1;else{for(var c=u(b.h.values()),d=c.next();!d.done;d=c.next())d=d.value,!d.ue||d.Ra||d.Ab||(d.ue=!1,hn(b,d,a));b=!0}}else b=!1;return b};
p.uh=function(){bb("Shaka Player's internal Manifest structure is NOT covered by semantic versioning compatibility guarantees.  It may change at any time!  Please consider filing a feature request for whatever you use getManifest() for.");return this.i};p.fl=function(){return this.Jc};
p.Uk=function(){var a={video:null,audio:null,text:null};if(this.l!=Pr)return a;var b=this.m.u,c=this.h.currentTime;b=u([b.video,b.audio,this.m.C]);for(var d=b.next();!d.done;d=b.next())if((d=d.value)&&d.segmentIndex){var e=d.segmentIndex.find(c);e=d.segmentIndex.get(e);e={codecs:e.codecs||d.codecs,mimeType:e.mimeType||d.mimeType,bandwidth:e.bandwidth||d.bandwidth};d.type=="video"?(e.width=d.width,e.height=d.height,a.video=e):d.type=="audio"?a.audio=e:d.type==vc&&(a.text=e)}return a};
function dr(a){var b=no();b.streaming.failureCallback=function(c){if(a.U()){var d=null;c.code==1001||c.code==1002?(d=1,a.g.streaming.lowLatencyMode&&(d=.1)):c.code==1003&&(d=.1);d!=null&&(c.severity=1,a.Xh(d))}};b.textDisplayFactory=function(){if(a.Re){var c=a.h;c=c.webkitDisplayingFullscreen||c.webkitPresentationMode&&c.webkitPresentationMode!="inline"?!1:!0}else c=!1;return c?new up(a.h,a.Re):"track"in document.createElement("track")?new pp(a):new tp};return b}p.ji=function(a){this.Re=a};
function Gr(a,b){for(var c=new Set,d=u(b.textStreams),e=d.next();!e.done;e=d.next())e=e.value,e.mimeType!="application/cea-608"&&e.mimeType!="application/cea-708"||c.add(e.originalId);d=u(b.variants);for(e=d.next();!e.done;e=d.next())if((e=e.value.video)&&e.closedCaptions)for(var f=u(e.closedCaptions.keys()),g=f.next();!g.done;g=f.next())if(g=g.value,!c.has(g)){var h=g.startsWith("CC")?"application/cea-608":"application/cea-708",k=new pm,l=e.closedCaptions.get(g);h={id:a.Ve++,originalId:g,groupId:null,
createSegmentIndex:function(){return Promise.resolve()},segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:l,originalLanguage:l,label:null,type:vc,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:e.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set([gf(h,"")]),isAudioMuxedInVideo:!1,baseOriginalId:null};
b.textStreams.push(h);c.add(g)}}
function ds(a,b){var c,d,e,f,g;return Q(function(h){if(h.g==1)return c=a.audio,d=a.video,e=function(k,l){var m,n,q;return Q(function(r){if(r.g==1)return k?k.segmentIndex?r.B(2):E(r,k.createSegmentIndex(),2):r.return(null);n=(m=k.segmentIndex.hc(l))?m.next().value:null;if(!n)return r.return(null);q=n.startTime;return r.return(q)})},E(h,e(c,b),2);if(h.g!=3)return f=h.h,E(h,e(d,b),3);g=h.h;return g!=null&&f!=null?h.return(Math.max(g,f)):g!=null?h.return(g):f!=null?h.return(f):h.return(b)})}
function vr(a){var b=a.Ef();if(a.C&&a.P&&a.G){if(a.g.streaming.rebufferingGoal==0){var c=a.L;c.j=!1;tm(c)}else c=a.L,c.j=b,tm(c);a.K&&(c=a.K,b||c.F||(c.F=!0),c.F&&b&&(c.I=!0,Qp(c,"ps",{ud:"r"})),c.J=b);Or(a);c=a.g.streaming.liveSync.dynamicTargetLatency.maxAttempts;if(a.g.streaming.liveSync.dynamicTargetLatency.enabled&&b&&a.ef<c){c=a.g.streaming.liveSync.dynamicTargetLatency.maxLatency;var d=a.g.streaming.liveSync.targetLatencyTolerance,e=a.g.streaming.liveSync.dynamicTargetLatency.rebufferIncrement;
a.T&&(a.T=Math.min(a.T+ ++a.ef*e,c-d))}}b=(new Map).set("buffering",b);a.dispatchEvent(lr("buffering",b))}function Qr(a,b){a.mc.Sa();a.mc.o(a.h,"timeupdate",function(){var c=a.h.currentTime,d=a.wa(),e=a.U(),f=e?a.g.streaming.safeSeekOffset:0;b>0?e&&b>1&&Math.floor(c)>=Math.floor(d.end)&&a.Cd():Math.floor(c)<=Math.floor(d.start+f)&&a.Cd()})}
function Or(a){if(a.C&&a.P){var b=a.C.g,c="playing";a.P.g==Di?c="buffering":a.isEnded()?c="ended":a.h.paused&&(c="paused");var d=c;if(b.g==null)b.g={timestamp:Date.now()/1E3,state:d,duration:0},b=!0;else{var e=Date.now()/1E3;b.g.duration=e-b.g.timestamp;b.g.state==d?b=!1:(b.h.push(b.g),b.g={timestamp:e,state:d,duration:0},b=!0)}b&&(c=(new Map).set("newstate",c),a.dispatchEvent(lr("statechanged",c)))}}
function hs(a){var b=a.h.playbackRate,c=a.U();if(a.g.streaming.vodDynamicPlaybackRate&&!c){var d=a.g.streaming.vodDynamicPlaybackRateLowBufferRate,e=a.Xi();e<=a.g.streaming.vodDynamicPlaybackRateBufferRatio?b!=d&&a.uc(d,!1):e==1&&b!==a.L.ld()&&a.Cd()}if(c&&(c=a.wa(),Number.isFinite(c.end)&&!(a.h.currentTime<c.start||a.h.paused))){d=a.g.streaming.liveSync.targetLatencyTolerance;e=a.g.streaming.liveSync.dynamicTargetLatency.enabled;var f=a.g.streaming.liveSync.dynamicTargetLatency.stabilityThreshold;
if(a.g.streaming.liveSync&&a.g.streaming.liveSync.enabled){var g=a.g.streaming.liveSync.targetLatency;var h=g+d;var k=Math.max(0,g-d);var l=a.g.streaming.liveSync.maxPlaybackRate;var m=a.g.streaming.liveSync.minPlaybackRate}else a.i&&a.i.serviceDescription&&(g=a.i.serviceDescription.targetLatency,a.i.serviceDescription.targetLatency!=null?h=a.i.serviceDescription.targetLatency+d:a.i.serviceDescription.maxLatency!=null&&(h=a.i.serviceDescription.maxLatency),a.i.serviceDescription.targetLatency!=null?
k=Math.max(0,a.i.serviceDescription.targetLatency-d):a.i.serviceDescription.minLatency!=null&&(k=a.i.serviceDescription.minLatency),l=a.i.serviceDescription.maxPlaybackRate||a.g.streaming.liveSync.maxPlaybackRate,m=a.i.serviceDescription.minPlaybackRate||a.g.streaming.liveSync.minPlaybackRate);a.T||typeof g!=="number"||(a.T=g);var n=a.g.streaming.liveSync.dynamicTargetLatency.maxAttempts;e&&a.pb&&a.T!==null&&typeof g==="number"&&a.ef<n&&Date.now()-a.pb>f*1E3&&(f=a.g.streaming.liveSync.dynamicTargetLatency.minLatency,
a.T=Math.max(a.T-(g-f)/2,f+d),a.pb=Date.now());e&&a.T!==null&&(h=a.T+d,k=a.T-d);g=c.end-a.h.currentTime;d=0;a.l==Tr&&(e=a.h.buffered,e.length>0&&(d=e.end(e.length-1),d=Math.max(l,d-c.end)));c=a.g.streaming.liveSync.panicMode;e=a.g.streaming.liveSync.panicThreshold*1E3;f=Date.now()-a.P.h;c&&!m&&(m=a.g.streaming.liveSync.minPlaybackRate);c&&m&&f<=e?b!=m&&a.uc(m,!1):h!=void 0&&l&&g-d>h?(b!=l&&a.uc(l,!1),a.pb=null):k!=void 0&&m&&g-d<k?(b!=m&&a.uc(m,!1),a.pb=null):b!==a.L.ld()&&(a.Cd(),a.pb=Date.now())}}
function is(a){if(a.h){var b=function(e,f){var g=g===void 0?Number.EPSILON:g;if(e===f)g=!0;else{var h=Math.abs(e-f);g=h<=g?!0:g!==Number.EPSILON?Math.abs(h-g)<=Number.EPSILON:!1}return(g||f>e)&&a.Dg<e?(a.Dg=e,!0):!1},c=a.wa();c=c.end-c.start;c=c>0?a.h.currentTime/c:0;if(!isNaN(c)){c*=100;if(b(0,c))var d=lr("started");else if(b(25,c))d=lr("firstquartile");else if(b(50,c))d=lr("midpoint");else if(b(75,c))d=lr("thirdquartile");else{if(b(100,c)||c>100)d=lr("complete");a.g&&a.g.playRangeEnd!=Infinity&&
a.isEnded()&&a.h.pause()}d&&a.dispatchEvent(d)}}}function Wr(a){try{Ki(a.Ue,a.i)}catch(c){return tr(a,c),!1}var b=pg(a.i.variants);b=a.J.create(b);a=a.u.setVariants(Array.from(b.values()));return typeof a=="boolean"?a:!0}
function $r(a,b){b=b===void 0?!1:b;if(Wr(a)){if(!a.g.abr.enabled){var c=a.J;typeof c.getLastAdaptationSet!="function"&&(bd("AdaptationSetCriteria w/o getLastAdaptationSet","Please use an AdaptationSetCriteria with getLastAdaptationSet."),c.getLastAdaptationSet=function(){return null});if(c=c.getLastAdaptationSet())if(c=Array.from(c.values()),c.length){var d=a.m.u;if(d&&d.video&&(c=c.find(function(e){return e.video==d.video})))return c}}return a.u.chooseVariant(b)}return null}
function ir(a,b,c,d,e){b=b===void 0?!0:b;c=c===void 0?0:c;d=d===void 0?!1:d;e=e===void 0?!0:e;var f=$r(a);f&&Yr(a,f,e,b,c,d)}
function Yr(a,b,c,d,e,f){f=f===void 0?!1:f;var g=a.m.u;if(b==g)d&&mn(a.m,b,d,e,!0);else{var h=a.C.h;h.h!=b&&(h.h=b,h.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));mn(a.m,b,d,e,f,c);d=null;g&&(d=gg(g));g=gg(b);g.active=!0;if(a.R&&(e=a.R,b=b.video)){b.dependencyStream&&(b=b.dependencyStream);f=0;h=-1;switch(b.mimeType){case "video/webm":f=1;break;case "video/mp4":f=2}switch(a.wh()){case "DASH":h=1;break;case "HLS":h=0}e.g&&(e.g.setLevelSwitching(b.id,
!0),e.g.setContainerFormat(f),e.j||e.g.setStreamingFormat(h))}c?(c=(new Map).set("oldTrack",d).set("newTrack",g),c=lr("adaptation",c),Es(a,c)):Fs(a,d,g);Gs(a,d,g)}}function xs(a,b){var c=Array.from(a.h.audioTracks).find(function(e){return e.enabled});b.enabled=!0;if(c){b.id!==c.id&&(c.enabled=!1);var d=ts(a);c=ng(c,d);b=ng(b,d);Fs(a,c,b);Gs(a,c,b)}}function ts(a){return a.h&&a.h.videoTracks?Array.from(a.h.videoTracks).find(function(b){return b.selected}):null}
function Sr(a){var b=lr("trackschanged");Es(a,b);Hs(a)}function Fs(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=lr("variantchanged",b);Es(a,b)}function Gs(a,b,c){var d=!1;b&&b.audioId==c.audioId&&b.audioGroupId==c.audioGroupId||(d=!0);d&&Hs(a)}function Hs(a){var b=lr("audiotrackschanged");Es(a,b)}function Rr(a){var b=lr("textchanged");Es(a,b)}function es(a){var b=lr("texttrackvisibility");Es(a,b)}
function gs(a){a.g.abr.enabled||hr(a);var b=(new Map).set("newStatus",a.g.abr.enabled);Es(a,lr("abrstatuschanged",b))}function fs(a){var b=a.Bc().find(function(c){return c.active});b&&a.A&&a.A.setTextLanguage&&a.A.setTextLanguage(b.language)}function hr(a,b){b=b===void 0?!0:b;if(a.l==Pr){a.Xe.stop();for(var c=u(a.i.variants),d=c.next();!d.done;d=c.next())d.value.disabledUntilTime=0;b&&Wr(a)}}
p.disableStream=function(a,b){if(!this.g.abr.enabled||this.l===mr||!navigator.onLine||b==0||!this.i)return!1;if(this.i.variants.some(function(h){var k=h[a.type];return k&&k.id!==a.id&&!h.disabledUntilTime?a.type=="audio"?a.language===k.language:!0:!1})){for(var c=!1,d=!1,e=u(this.i.variants),f=e.next();!f.done;f=e.next()){f=f.value;var g=f[a.type];g&&(g.id===a.id?(f.disabledUntilTime=Date.now()/1E3+b,c=!0):g.trickModeVideo&&g.trickModeVideo.id==a.id&&(d=!0))}if(!c&&d)return!1;this.Xe.xa(1);b=this.Rc().video.reduce(function(h,
k){return h+k.end-k.start},0);ir(this,!1,b,!0,!1);return!0}return!1};
function tr(a,b){var c,d,e,f,g;return Q(function(h){switch(h.g){case 1:if(a.l==mr)return h.return();b.severity===1&&a.C.L++;c=!0;if(!(a.Z&&a.i&&a.m)||b.code!=3016&&b.code!=3014&&b.code!=3015&&b.code!=3024&&b.code!=3018){h.B(2);break}d=Tb();if(d.Ja()==="WEBKIT"&&b.code==3016)return h.return();sa(h,3);return E(h,Cn(a.m),5);case 5:e=h.h;c=!e;e&&(f=lr("mediasourcerecovered"),a.dispatchEvent(f));ua(h,2);break;case 3:va(h),c=!0;case 2:if(!c)return h.return();b.severity===2&&hr(a,!1);g=lr("error",(new Map).set("detail",
b));a.dispatchEvent(g);g.defaultPrevented&&(b.handled=!0);H(h)}})}p.addFont=function(a,b){return ek(a,b)};function Ir(a,b,c,d){d=d===void 0?a:d;a=(new Map).set("detail",{schemeIdUri:c.schemeIdUri,value:c.value,startTime:c.startTime,endTime:c.endTime,id:c.id,timescale:c.timescale,eventElement:c.eventElement,eventNode:c.eventNode});d.dispatchEvent(lr(b,a))}
function Jr(a,b,c,d){d=d===void 0?!1:d;b=(new Map).set("mediaQuality",{bandwidth:b.bandwidth,audioSamplingRate:b.audioSamplingRate,codecs:b.codecs,contentType:b.contentType,frameRate:b.frameRate,height:b.height,mimeType:b.mimeType,channelsCount:b.channelsCount,pixelAspectRatio:b.pixelAspectRatio,width:b.width,label:b.label,roles:b.roles,language:b.language}).set("position",c);a.dispatchEvent(lr(d?"audiotrackchanged":"mediaqualitychanged",b))}
function sr(a,b){b=b===void 0?!0:b;if(!a.h.error)return b?new U(2,3,3016):null;var c=a.h.error.code;if(!b&&c==1)return null;if(b=a.h.error.msExtendedCode)b<0&&(b+=4294967296),b=b.toString(16);return new U(2,3,3016,c,b,a.h.error.message)}
function Kr(a,b){var c=lr("keystatuschanged");a.dispatchEvent(c);var d=Object.keys(b);d.length==1&&d[0]==""&&(d=["00"],b={"00":b[""]});var e=d.length==1&&d[0]=="00";c=!1;if(d.length){d=a.keySystem();for(var f=th(a.g.drm.clearKeys),g=function(t,v){t.allowedByKeySystem=!0;v=u(v);for(var w=v.next();!w.done;w=v.next())if(w=w.value,(w=b[e?"00":w])||a.F.H)t.allowedByKeySystem=t.allowedByKeySystem&&!!w&&!Li.includes(w)},h=u(a.i.variants),k=h.next();!k.done;k=h.next()){k=k.value;var l=sg(k);l=u(l);for(var m=
l.next();!m.done;m=l.next()){m=m.value;var n=k.allowedByKeySystem;if(m.keyIds.size)if(m.drmInfos.length&&!f.size&&a.i.type=="HLS")for(var q=u(m.drmInfos),r=q.next();!r.done;r=q.next())r=r.value,r.keySystem==d&&(r.keyIds.size?g(k,r.keyIds):g(k,m.keyIds));else g(k,m.keyIds);n!=k.allowedByKeySystem&&(c=!0)}}}if(c&&(Sr(a),!Wr(a)))return;(c=a.m.u)&&!c.allowedByKeySystem&&ir(a)}function Xr(a,b,c){b>0&&(a.U()||a.Vj(b));b=a.getDuration();c<b&&(a.U()||a.Ib(c))}
function Es(a,b){Q(function(c){if(c.g==1)return E(c,Promise.resolve(),2);a.l!=mr&&a.dispatchEvent(b);H(c)})}function zs(a){var b=new Set;a=u(a);for(var c=a.next();!c.done;c=a.next())c=c.value,c.language?b.add(Bc(c.language)):b.add("und");return b}
function ys(a){for(var b=new Map,c=new Map,d=0;d<a.length;d++){var e=a[d],f="und",g=[];e.language&&(f=Bc(e.language));e.type=="variant"?g=e.audioRoles:g=e.roles;g&&g.length||(g=[""]);b.has(f)||b.set(f,new Set);g=u(g);for(var h=g.next();!h.done;h=g.next())h=h.value,b.get(f).add(h),e.label&&(c.has(f)||c.set(f,new Map),c.get(f).set(h,e.label))}var k=[];b.forEach(function(l,m){l=u(l);for(var n=l.next();!n.done;n=l.next()){n=n.value;var q=null;c.has(m)&&c.get(m).has(n)&&(q=c.get(m).get(n));k.push({language:m,
role:n,label:q})}});return k}p.Da=function(){return this.h&&this.h.remote?this.h.remote.state!="disconnected":!1};p.isEnded=function(){return!this.h||this.h.ended?!0:this.Z&&!this.U()&&this.h.currentTime>=this.wa().end};S("shaka.Player",X);X.prototype.isEnded=X.prototype.isEnded;X.prototype.isRemotePlayback=X.prototype.Da;X.prototype.addFont=X.prototype.addFont;X.prototype.setVideoContainer=X.prototype.ji;X.prototype.getFetchedPlaybackInfo=X.prototype.Uk;X.prototype.getManifestParserFactory=X.prototype.fl;
X.prototype.getManifest=X.prototype.uh;X.prototype.retryStreaming=X.prototype.Xh;X.prototype.setMaxHardwareResolution=X.prototype.Em;X.prototype.addChaptersTrack=X.prototype.gf;X.prototype.addThumbnailsTrack=X.prototype.hf;X.prototype.addTextTrackAsync=X.prototype.ie;X.prototype.getStats=X.prototype.getStats;X.prototype.getBufferedInfo=X.prototype.Rc;X.prototype.getSegmentAvailabilityDuration=X.prototype.zf;X.prototype.getPresentationStartTimeAsDate=X.prototype.aj;
X.prototype.getPlayheadTimeAsDate=X.prototype.kl;X.prototype.setTextTrackVisibility=X.prototype.$d;X.prototype.getChaptersAsync=X.prototype.qh;X.prototype.getChapters=X.prototype.Kk;X.prototype.getChaptersTracks=X.prototype.Lk;X.prototype.isTextTrackVisible=X.prototype.Yc;X.prototype.selectVariantsByLabel=X.prototype.ym;X.prototype.selectTextLanguage=X.prototype.ai;X.prototype.selectAudioLanguage=X.prototype.Mj;X.prototype.getTextLanguages=X.prototype.xl;X.prototype.getAudioLanguages=X.prototype.Gk;
X.prototype.getTextLanguagesAndRoles=X.prototype.yl;X.prototype.getAudioLanguagesAndRoles=X.prototype.Hk;X.prototype.getVideoTracks=X.prototype.getVideoTracks;X.prototype.selectVideoTrack=X.prototype.Oj;X.prototype.getAudioTracks=X.prototype.getAudioTracks;X.prototype.selectAudioTrack=X.prototype.Nj;X.prototype.selectVariantTrack=X.prototype.Je;X.prototype.selectTextTrack=X.prototype.hg;X.prototype.getThumbnails=X.prototype.bj;X.prototype.getAllThumbnails=X.prototype.Fk;
X.prototype.getImageTracks=X.prototype.sh;X.prototype.getTextTracks=X.prototype.Bc;X.prototype.getVariantTracks=X.prototype.Qb;X.prototype.cancelTrickPlay=X.prototype.Cd;X.prototype.trickPlay=X.prototype.uc;X.prototype.useTrickPlayTrackIfAvailable=X.prototype.zi;X.prototype.getPlaybackRate=X.prototype.Za;X.prototype.isBuffering=X.prototype.Ef;X.prototype.getKeyStatuses=X.prototype.wf;X.prototype.getActiveSessionsMetadata=X.prototype.ph;X.prototype.getExpiration=X.prototype.qe;
X.prototype.drmInfo=X.prototype.drmInfo;X.prototype.keySystem=X.prototype.keySystem;X.prototype.isFullyLoaded=X.prototype.Ml;X.prototype.goToLive=X.prototype.Hl;X.prototype.seekRange=X.prototype.wa;X.prototype.isVideoOnly=X.prototype.Hf;X.prototype.isAudioOnly=X.prototype.Md;X.prototype.isInProgress=X.prototype.md;X.prototype.isLive=X.prototype.U;X.prototype.getQueueManager=X.prototype.xf;X.prototype.getAdManager=X.prototype.vf;X.prototype.getAssetUri=X.prototype.kd;
X.prototype.getNetworkingEngine=X.prototype.Xb;X.prototype.getMediaElement=X.prototype.jl;X.prototype.getManifestType=X.prototype.wh;X.prototype.getLoadMode=X.prototype.Zk;X.prototype.resetConfiguration=X.prototype.Hj;X.prototype.getBufferFullness=X.prototype.Xi;X.prototype.getNonDefaultConfiguration=X.prototype.$i;X.prototype.getConfigurationForLowLatency=X.prototype.Ok;X.prototype.getConfiguration=X.prototype.getConfiguration;X.prototype.configurationForLowLatency=X.prototype.Ck;
X.prototype.configure=X.prototype.configure;X.prototype.releaseAllMutexes=X.prototype.pm;X.prototype.destroyAllPreloads=X.prototype.Wg;X.prototype.preload=X.prototype.preload;X.prototype.detachAndSavePreload=X.prototype.Si;X.prototype.unloadAndSavePreload=X.prototype.ik;X.prototype.load=X.prototype.load;X.prototype.updateStartTime=X.prototype.Mm;X.prototype.unload=X.prototype.vc;X.prototype.detach=X.prototype.detach;X.prototype.attachCanvas=X.prototype.Gi;X.prototype.attach=X.prototype.ec;
X.probeSupport=function(a){a=a===void 0?!0:a;var b,c,d,e,f,g,h;return Q(function(k){switch(k.g){case 1:b={};if(!a){k.B(2);break}return E(k,wi(),3);case 3:b=k.h;case 2:return c=Pi(),d=Nk(),e=Tb(),E(k,e.yc(),4);case 4:return f=k.h,g={manifest:c,media:d,drm:b,hardwareResolution:f},h=or,h.forEach(function(l,m){g[m]=l()}),k.return(g)}})};X.isBrowserSupported=pr;X.setQueueManagerFactory=function(a){gr=a};X.setAdManagerFactory=function(a){fr=a};X.registerSupportPlugin=nr;X.prototype.destroy=X.prototype.destroy;
var mr=0,cr=1,Pr=2,Tr=3;X.LoadMode={DESTROYED:mr,NOT_LOADED:cr,MEDIA_SOURCE:Pr,SRC_EQUALS:Tr};X.version="v4.16.6-1-gbdf61f7c8-dirty";var Is=["4","16"];cd=new function(a){this.g=a;this.i=dd;this.h=ed}(new ad(Number(Is[0]),Number(Is[1])));var or=new Map,fr=null,gr=null;function Js(){this.g=[];this.i=this.m=this.l=this.j=this.h=0}function Ks(a){return a.g.length?a.g.reduce(function(b,c){return b+c},0)/a.g.length:0};function Ls(a,b,c){var d=this;this.g=a;this.h=b;this.m=c;this.i=!1;this.j=this.h.getVolume();this.l=new Wc;this.l.o(this.h,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.l.o(this.h,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}p=Ls.prototype;p.needsSkipUI=function(){return!1};p.isClientRendering=function(){return!0};p.hasCustomClick=function(){return!0};p.isUsingAnotherMediaElement=function(){return!0};p.getDuration=function(){return this.g.getDuration()};
p.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()};p.getRemainingTime=function(){return this.h.getRemainingTime()};p.isPaused=function(){return this.i};p.isSkippable=function(){return this.g.getSkipTimeOffset()>=0};p.getTimeUntilSkippable=function(){var a=this.g.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};p.canSkipNow=function(){return this.h.getAdSkippableState()};p.skip=function(){return this.h.skip()};p.pause=function(){return this.h.pause()};
p.play=function(){return this.h.resume()};p.getVolume=function(){return this.h.getVolume()};p.setVolume=function(a){this.m.volume=a;return this.h.setVolume(a)};p.isMuted=function(){return this.h.getVolume()==0};p.isLinear=function(){return this.g.isLinear()};p.resize=function(a,b){this.h.resize(a,b)};p.setMuted=function(a){(this.m.muted=a)?(this.j=this.getVolume(),this.h.setVolume(0)):this.h.setVolume(this.j)};p.getSequenceLength=function(){var a=this.g.getAdPodInfo();return a==null?1:a.getTotalAds()};
p.getPositionInSequence=function(){var a=this.g.getAdPodInfo();return a==null?1:a.getAdPosition()};p.getTitle=function(){return this.g.getTitle()};p.getDescription=function(){return this.g.getDescription()};p.getVastMediaBitrate=function(){return this.g.getVastMediaBitrate()};p.getVastMediaHeight=function(){return this.g.getVastMediaHeight()};p.getVastMediaWidth=function(){return this.g.getVastMediaWidth()};p.getVastAdId=function(){return""};p.getAdId=function(){return this.g.getAdId()};
p.getCreativeAdId=function(){return this.g.getCreativeAdId()};p.getAdvertiserName=function(){return this.g.getAdvertiserName()};p.getMediaUrl=function(){return this.g.getMediaUrl()};p.getTimeOffset=function(){var a=this.g.getAdPodInfo();return a==null?0:a.getTimeOffset()};p.getPodIndex=function(){var a=this.g.getAdPodInfo();return a==null?0:a.getPodIndex()};p.release=function(){this.h=this.g=null};S("shaka.ads.ClientSideAd",Ls);Ls.prototype.release=Ls.prototype.release;Ls.prototype.getPodIndex=Ls.prototype.getPodIndex;
Ls.prototype.getTimeOffset=Ls.prototype.getTimeOffset;Ls.prototype.getMediaUrl=Ls.prototype.getMediaUrl;Ls.prototype.getAdvertiserName=Ls.prototype.getAdvertiserName;Ls.prototype.getCreativeAdId=Ls.prototype.getCreativeAdId;Ls.prototype.getAdId=Ls.prototype.getAdId;Ls.prototype.getVastAdId=Ls.prototype.getVastAdId;Ls.prototype.getVastMediaWidth=Ls.prototype.getVastMediaWidth;Ls.prototype.getVastMediaHeight=Ls.prototype.getVastMediaHeight;Ls.prototype.getVastMediaBitrate=Ls.prototype.getVastMediaBitrate;
Ls.prototype.getDescription=Ls.prototype.getDescription;Ls.prototype.getTitle=Ls.prototype.getTitle;Ls.prototype.getPositionInSequence=Ls.prototype.getPositionInSequence;Ls.prototype.getSequenceLength=Ls.prototype.getSequenceLength;Ls.prototype.setMuted=Ls.prototype.setMuted;Ls.prototype.resize=Ls.prototype.resize;Ls.prototype.isLinear=Ls.prototype.isLinear;Ls.prototype.isMuted=Ls.prototype.isMuted;Ls.prototype.setVolume=Ls.prototype.setVolume;Ls.prototype.getVolume=Ls.prototype.getVolume;
Ls.prototype.play=Ls.prototype.play;Ls.prototype.pause=Ls.prototype.pause;Ls.prototype.skip=Ls.prototype.skip;Ls.prototype.canSkipNow=Ls.prototype.canSkipNow;Ls.prototype.getTimeUntilSkippable=Ls.prototype.getTimeUntilSkippable;Ls.prototype.isSkippable=Ls.prototype.isSkippable;Ls.prototype.isPaused=Ls.prototype.isPaused;Ls.prototype.getRemainingTime=Ls.prototype.getRemainingTime;Ls.prototype.getMinSuggestedDuration=Ls.prototype.getMinSuggestedDuration;Ls.prototype.getDuration=Ls.prototype.getDuration;
Ls.prototype.isUsingAnotherMediaElement=Ls.prototype.isUsingAnotherMediaElement;Ls.prototype.hasCustomClick=Ls.prototype.hasCustomClick;Ls.prototype.isClientRendering=Ls.prototype.isClientRendering;Ls.prototype.needsSkipUI=Ls.prototype.needsSkipUI;function Ms(){}
function Ns(a,b){var c=[];a=u(Vd(a,"Ad"));for(var d=a.next();!d.done;d=a.next())if(d=Zd(d.value,"InLine"))if(d=Zd(d,"Creatives")){d=u(Vd(d,"Creative"));for(var e=d.next();!e.done;e=d.next()){e=e.value;var f=Zd(e,"Linear");f&&Os(c,b,f);if(e=Zd(e,"NonLinearAds")){e=Vd(e,"NonLinear");e=u(e);for(var g=e.next();!g.done;g=e.next())a:{f=c;var h=b,k=g.value,l=Zd(k,"StaticResource");if(l)g=l.attributes.creativeType;else{l=Zd(k,"HTMLResource");if(!l)break a;g="text/html"}if(l=Xd(l)){g==="text/html"&&(l="data:text/html;charset=UTF-8,"+
encodeURIComponent(l));var m=be(k,"width",he)||be(k,"expandedWidth",he),n=be(k,"height",he)||be(k,"expandedHeight",he);if(m||n){var q=null,r=Zd(k,"NonLinearClickThrough");r&&(r=Xd(r))&&(q=r);r=null;(k=k.attributes.minSuggestedDuration)&&(r=Id(k));k=0;h!=null&&(k=h);f.push({id:null,groupId:null,startTime:k,endTime:null,uri:l,mimeType:g,isSkippable:!1,skipOffset:null,skipFor:null,canJump:!1,resumeOffset:0,playoutLimit:r,once:!0,pre:h==null,post:h==Infinity,timelineRange:!1,loop:!1,overlay:{viewport:{x:0,
y:0},topLeft:{x:0,y:0},size:{x:m||0,y:n||0}},displayOnBackground:!1,currentVideo:null,background:null,clickThroughUrl:q})}}}}}}return c}
function Os(a,b,c){var d=0;b!=null&&(d=b);var e=null;c.attributes.skipoffset&&(e=Id(c.attributes.skipoffset),isNaN(e)&&(e=null));var f=Zd(c,"MediaFiles");if(f){var g=null;(c=Zd(c,"VideoClicks"))&&(c=Zd(c,"ClickThrough"))&&(c=Xd(c))&&(g=c);f=c=Vd(f,"MediaFile");c=c.filter(function(k){return k.attributes.delivery=="streaming"});c.length&&(f=c);f=f.sort(function(k,l){return(parseInt(l.attributes.height,10)||0)-(parseInt(k.attributes.height,10)||0)});f=u(f);for(c=f.next();!c.done;c=f.next())if(c=c.value,
!c.attributes.apiFramework){var h=Xd(c);if(h){a.push({id:null,groupId:null,startTime:d,endTime:null,uri:h,mimeType:c.attributes.type||null,isSkippable:e!=null,skipOffset:e,skipFor:null,canJump:!1,resumeOffset:0,playoutLimit:null,once:!0,pre:b==null,post:b==Infinity,timelineRange:!1,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null,clickThroughUrl:g});break}}}}
function Ps(a){var b=[];a=u(Vd(a,"vmap:AdBreak"));for(var c=a.next();!c.done;c=a.next()){var d=c.value,e=d.attributes.timeOffset;e&&(c=null,e=="start"?c=null:e=="end"?c=Infinity:c=Id(e),(d=Zd(d,"vmap:AdSource"))&&(d=Zd(d,"vmap:AdTagURI"))&&(d=Wd(d))&&b.push({time:c,uri:d}))}return b}S("shaka.ads.Utils",Ms);Ms.ADS_LOADED="ads-loaded";Ms.AD_STARTED="ad-started";Ms.AD_FIRST_QUARTILE="ad-first-quartile";Ms.AD_MIDPOINT="ad-midpoint";Ms.AD_THIRD_QUARTILE="ad-third-quartile";Ms.AD_COMPLETE="ad-complete";
Ms.AD_STOPPED="ad-stopped";Ms.AD_SKIPPED="ad-skipped";Ms.AD_VOLUME_CHANGED="ad-volume-changed";Ms.AD_MUTED="ad-muted";Ms.AD_PAUSED="ad-paused";Ms.AD_RESUMED="ad-resumed";Ms.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";Ms.CUEPOINTS_CHANGED="ad-cue-points-changed";Ms.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded";Ms.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded";Ms.AD_CLICKED="ad-clicked";Ms.AD_PROGRESS="ad-progress";Ms.AD_BUFFERING="ad-buffering";Ms.AD_IMPRESSION="ad-impression";
Ms.AD_DURATION_CHANGED="ad-duration-changed";Ms.AD_CLOSED="ad-closed";Ms.AD_LOADED="ad-loaded";Ms.ALL_ADS_COMPLETED="all-ads-completed";Ms.AD_LINEAR_CHANGED="ad-linear-changed";Ms.AD_METADATA="ad-metadata";Ms.AD_RECOVERABLE_ERROR="ad-recoverable-error";Ms.AD_ERROR="ad-error";Ms.AD_BREAK_READY="ad-break-ready";Ms.AD_INTERACTION="ad-interaction";Ms.AD_CONTENT_PAUSE_REQUESTED="ad-content-pause-requested";Ms.AD_CONTENT_RESUME_REQUESTED="ad-content-resume-requested";Ms.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested";function Qs(a,b,c,d,e){var f=this;this.A=a;this.i=b;this.G=!1;this.C=this.u=null;this.H=NaN;this.l=e;this.j=null;this.h=new Wc;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);this.F=new google.ima.AdDisplayContainer(this.A,this.i);this.F.initialize();this.m=new google.ima.AdsLoader(this.F);this.m.getSettings().setPlayerType("shaka-player");this.m.getSettings().setPlayerVersion("v4.16.6-1-gbdf61f7c8-dirty");this.g=null;this.D=d||new google.ima.AdsRenderingSettings;
this.h.o(this.m,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(g){Rs(f,g)});this.h.o(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,function(g){Ss(f,g)});this.h.o(this.i,"ended",function(){f.m.contentComplete()});this.h.ua(this.i,"play",function(){f.G=!0})}Qs.prototype.configure=function(a){this.u=a};Qs.prototype.stop=function(){this.g&&this.g.stop();this.A&&bk(this.A)};
Qs.prototype.release=function(){this.stop();this.C&&this.C.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.m.destroy();this.F.destroy()};function Ss(a,b){b.getError();b=(new Map).set("originalEvent",b);a.l(new T("ad-error",b));Ts(a,null);a.l(new T("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
function Rs(a,b){a.l(new T("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.H)));if(a.u.customPlayheadTracker){var c={currentTime:a.i.currentTime};a.g=b.getAdsManager(c,a.D);a.i.muted?a.g.setVolume(0):a.g.setVolume(a.i.volume);a.h.o(a.i,"timeupdate",function(){a.i.duration&&(c.currentTime=a.i.currentTime)});a.h.o(a.i,"volumechange",function(){a.j&&(a.j.setVolume(a.i.volume),a.i.muted&&a.j.setMuted(!0))})}else a.g=b.getAdsManager(a.i,a.D);a.l(new T("ima-ad-manager-loaded",(new Map).set("imaAdManager",
a.g)));var d=a.g.getCuePoints();if(d.length){b=[];d=u(d);for(var e=d.next();!e.done;e=d.next())b.push({start:e.value,end:null});a.l(new T("ad-cue-points-changed",(new Map).set("cuepoints",b)))}Us(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight),a.h.o(a.i,"loadeddata",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight)}),"ResizeObserver"in window?(a.C=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight)}),a.C.observe(a.i)):a.h.o(document,"fullscreenchange",function(){a.g.resize(a.i.offsetWidth,
a.i.offsetHeight)}),a.G||a.u.skipPlayDetection?a.g.start():a.h.ua(a.i,"play",function(){a.G=!0;a.g.start()})}catch(f){Ts(a,null)}}
function Us(a){function b(c,d){c=(new Map).set("originalEvent",c);a.l(new T(d,c))}a.h.o(a.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){Ss(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){Vs(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.STARTED,function(c){Vs(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(c){b(c,"ad-first-quartile")});a.h.o(a.g,google.ima.AdEvent.Type.MIDPOINT,function(c){b(c,"ad-midpoint")});a.h.o(a.g,google.ima.AdEvent.Type.THIRD_QUARTILE,
function(c){b(c,"ad-third-quartile")});a.h.o(a.g,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.o(a.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){Ts(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){Ts(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.SKIPPED,function(c){b(c,"ad-skipped")});a.h.o(a.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(c){b(c,"ad-volume-changed")});a.h.o(a.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(c){b(c,"ad-muted")});
a.h.o(a.g,google.ima.AdEvent.Type.PAUSED,function(c){a.j&&(a.j.i=!0,b(c,"ad-paused"))});a.h.o(a.g,google.ima.AdEvent.Type.RESUMED,function(c){a.j&&(a.j.i=!1,b(c,"ad-resumed"))});a.h.o(a.g,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(c){a.j&&b(c,"ad-skip-state-changed")});a.h.o(a.g,google.ima.AdEvent.Type.CLICK,function(c){b(c,"ad-clicked")});a.h.o(a.g,google.ima.AdEvent.Type.AD_PROGRESS,function(c){b(c,"ad-progress")});a.h.o(a.g,google.ima.AdEvent.Type.AD_BUFFERING,function(c){b(c,"ad-buffering")});
a.h.o(a.g,google.ima.AdEvent.Type.IMPRESSION,function(c){b(c,"ad-impression")});a.h.o(a.g,google.ima.AdEvent.Type.DURATION_CHANGE,function(c){b(c,"ad-duration-changed")});a.h.o(a.g,google.ima.AdEvent.Type.USER_CLOSE,function(c){b(c,"ad-closed")});a.h.o(a.g,google.ima.AdEvent.Type.LOADED,function(c){b(c,"ad-loaded")});a.h.o(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){b(c,"all-ads-completed")});a.h.o(a.g,google.ima.AdEvent.Type.LINEAR_CHANGED,function(c){b(c,"ad-linear-changed")});a.h.o(a.g,
google.ima.AdEvent.Type.AD_METADATA,function(c){b(c,"ad-metadata")});a.h.o(a.g,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.o(a.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.o(a.g,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})}
function Vs(a,b){var c=b.getAd();c?(a.j=new Ls(c,a.g,a.i),b.type!=google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED||a.u.supportsMultipleMediaElements||a.l(new T("ad-content-pause-requested")),b=(new Map).set("ad",a.j).set("sdkAdObject",c).set("originalEvent",b),a.l(new T("ad-started",b)),a.j.isLinear()&&(a.A.setAttribute("ad-active","true"),a.u.customPlayheadTracker||a.i.pause(),a.i.muted?(b=a.j,b.j=a.i.volume,b.h.setVolume(0)):a.j.setVolume(a.i.volume))):bb("The IMA SDK fired a "+b.type+" event with no associated ad. Unable to play ad!")}
function Ts(a,b){b&&b.type==google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED&&!a.u.supportsMultipleMediaElements&&a.l(new T("ad-content-resume-requested"));a.l(new T("ad-stopped",(new Map).set("originalEvent",b)));a.j&&a.j.isLinear()&&(a.A.removeAttribute("ad-active"),a.u.customPlayheadTracker||a.i.ended||a.i.play())};function Ws(a,b,c,d,e,f){this.g=a;this.h=b;this.j=(this.i=b.isSkippable)?b.skipOffset||0:b.skipOffset;this.l=b.skipFor;this.C=c;this.u=d;this.m=e;this.A=f;this.D=b.overlay}p=Ws.prototype;p.needsSkipUI=function(){return!0};p.isClientRendering=function(){return!0};p.hasCustomClick=function(){return this.h.clickThroughUrl!=null};p.isUsingAnotherMediaElement=function(){return this.A};p.getDuration=function(){var a=this.g.duration;return isNaN(a)?-1:a};p.getMinSuggestedDuration=function(){return this.getDuration()};
p.getRemainingTime=function(){var a=this.g.duration;return isNaN(a)?-1:a-this.g.currentTime};p.isPaused=function(){return this.g.paused};p.isSkippable=function(){return this.i&&this.l!=null?this.getDuration()-this.getRemainingTime()<this.j+this.l:this.i};p.getTimeUntilSkippable=function(){if(this.isSkippable()){var a=this.getRemainingTime()+this.j-this.getDuration();return Math.max(a,0)}return Math.max(this.getRemainingTime(),0)};
p.canSkipNow=function(){return this.i&&this.getTimeUntilSkippable()==0};p.skip=function(){this.canSkipNow()&&this.C()};p.pause=function(){return this.g.pause()};p.play=function(){return this.g.play()};p.getVolume=function(){return this.g.volume};p.setVolume=function(a){this.g.volume=a};p.isMuted=function(){return this.g.muted};p.isLinear=function(){return this.D==null};p.resize=function(){};p.setMuted=function(a){this.g.muted=a};p.getSequenceLength=function(){return this.u};
p.getPositionInSequence=function(){return this.m};p.getTitle=function(){return""};p.getDescription=function(){return""};p.getVastMediaBitrate=function(){return 0};p.getVastMediaHeight=function(){return 0};p.getVastMediaWidth=function(){return 0};p.getVastAdId=function(){return""};p.getAdId=function(){return this.h.id||""};p.getCreativeAdId=function(){return""};p.getAdvertiserName=function(){return""};p.getMediaUrl=function(){return this.h.uri};
p.getTimeOffset=function(){return this.h.pre?0:this.h.post?-1:this.h.startTime};p.getPodIndex=function(){return 0};p.release=function(){this.g=null};S("shaka.ads.InterstitialAd",Ws);Ws.prototype.release=Ws.prototype.release;Ws.prototype.getPodIndex=Ws.prototype.getPodIndex;Ws.prototype.getTimeOffset=Ws.prototype.getTimeOffset;Ws.prototype.getMediaUrl=Ws.prototype.getMediaUrl;Ws.prototype.getAdvertiserName=Ws.prototype.getAdvertiserName;Ws.prototype.getCreativeAdId=Ws.prototype.getCreativeAdId;
Ws.prototype.getAdId=Ws.prototype.getAdId;Ws.prototype.getVastAdId=Ws.prototype.getVastAdId;Ws.prototype.getVastMediaWidth=Ws.prototype.getVastMediaWidth;Ws.prototype.getVastMediaHeight=Ws.prototype.getVastMediaHeight;Ws.prototype.getVastMediaBitrate=Ws.prototype.getVastMediaBitrate;Ws.prototype.getDescription=Ws.prototype.getDescription;Ws.prototype.getTitle=Ws.prototype.getTitle;Ws.prototype.getPositionInSequence=Ws.prototype.getPositionInSequence;Ws.prototype.getSequenceLength=Ws.prototype.getSequenceLength;
Ws.prototype.setMuted=Ws.prototype.setMuted;Ws.prototype.resize=Ws.prototype.resize;Ws.prototype.isLinear=Ws.prototype.isLinear;Ws.prototype.isMuted=Ws.prototype.isMuted;Ws.prototype.setVolume=Ws.prototype.setVolume;Ws.prototype.getVolume=Ws.prototype.getVolume;Ws.prototype.play=Ws.prototype.play;Ws.prototype.pause=Ws.prototype.pause;Ws.prototype.skip=Ws.prototype.skip;Ws.prototype.canSkipNow=Ws.prototype.canSkipNow;Ws.prototype.getTimeUntilSkippable=Ws.prototype.getTimeUntilSkippable;
Ws.prototype.isSkippable=Ws.prototype.isSkippable;Ws.prototype.isPaused=Ws.prototype.isPaused;Ws.prototype.getRemainingTime=Ws.prototype.getRemainingTime;Ws.prototype.getMinSuggestedDuration=Ws.prototype.getMinSuggestedDuration;Ws.prototype.getDuration=Ws.prototype.getDuration;Ws.prototype.isUsingAnotherMediaElement=Ws.prototype.isUsingAnotherMediaElement;Ws.prototype.hasCustomClick=Ws.prototype.hasCustomClick;Ws.prototype.isClientRendering=Ws.prototype.isClientRendering;
Ws.prototype.needsSkipUI=Ws.prototype.needsSkipUI;function Xs(a,b,c){this.g=a;this.j=b;this.h=c;this.i=a.overlay==null}p=Xs.prototype;p.needsSkipUI=function(){return!0};p.isClientRendering=function(){return!0};p.hasCustomClick=function(){return this.g.clickThroughUrl!=null};p.isUsingAnotherMediaElement=function(){return!1};p.getDuration=function(){return-1};p.getMinSuggestedDuration=function(){return this.getDuration()};p.getRemainingTime=function(){return-1};p.isPaused=function(){return!1};p.isSkippable=function(){return!1};
p.getTimeUntilSkippable=function(){return 0};p.canSkipNow=function(){return!1};p.skip=function(){};p.pause=function(){};p.play=function(){};p.getVolume=function(){return 1};p.setVolume=function(){};p.isMuted=function(){return!1};p.isLinear=function(){return this.i};p.resize=function(){};p.setMuted=function(){};p.getSequenceLength=function(){return this.j};p.getPositionInSequence=function(){return this.h};p.getTitle=function(){return""};p.getDescription=function(){return""};p.getVastMediaBitrate=function(){return 0};
p.getVastMediaHeight=function(){return 0};p.getVastMediaWidth=function(){return 0};p.getVastAdId=function(){return""};p.getAdId=function(){return this.g.id||""};p.getCreativeAdId=function(){return""};p.getAdvertiserName=function(){return""};p.getMediaUrl=function(){return this.g.uri};p.getTimeOffset=function(){return this.g.pre?0:this.g.post?-1:this.g.startTime};p.getPodIndex=function(){return 0};p.release=function(){};S("shaka.ads.InterstitialStaticAd",Xs);Xs.prototype.release=Xs.prototype.release;
Xs.prototype.getPodIndex=Xs.prototype.getPodIndex;Xs.prototype.getTimeOffset=Xs.prototype.getTimeOffset;Xs.prototype.getMediaUrl=Xs.prototype.getMediaUrl;Xs.prototype.getAdvertiserName=Xs.prototype.getAdvertiserName;Xs.prototype.getCreativeAdId=Xs.prototype.getCreativeAdId;Xs.prototype.getAdId=Xs.prototype.getAdId;Xs.prototype.getVastAdId=Xs.prototype.getVastAdId;Xs.prototype.getVastMediaWidth=Xs.prototype.getVastMediaWidth;Xs.prototype.getVastMediaHeight=Xs.prototype.getVastMediaHeight;
Xs.prototype.getVastMediaBitrate=Xs.prototype.getVastMediaBitrate;Xs.prototype.getDescription=Xs.prototype.getDescription;Xs.prototype.getTitle=Xs.prototype.getTitle;Xs.prototype.getPositionInSequence=Xs.prototype.getPositionInSequence;Xs.prototype.getSequenceLength=Xs.prototype.getSequenceLength;Xs.prototype.setMuted=Xs.prototype.setMuted;Xs.prototype.resize=Xs.prototype.resize;Xs.prototype.isLinear=Xs.prototype.isLinear;Xs.prototype.isMuted=Xs.prototype.isMuted;Xs.prototype.setVolume=Xs.prototype.setVolume;
Xs.prototype.getVolume=Xs.prototype.getVolume;Xs.prototype.play=Xs.prototype.play;Xs.prototype.pause=Xs.prototype.pause;Xs.prototype.skip=Xs.prototype.skip;Xs.prototype.canSkipNow=Xs.prototype.canSkipNow;Xs.prototype.getTimeUntilSkippable=Xs.prototype.getTimeUntilSkippable;Xs.prototype.isSkippable=Xs.prototype.isSkippable;Xs.prototype.isPaused=Xs.prototype.isPaused;Xs.prototype.getRemainingTime=Xs.prototype.getRemainingTime;Xs.prototype.getMinSuggestedDuration=Xs.prototype.getMinSuggestedDuration;
Xs.prototype.getDuration=Xs.prototype.getDuration;Xs.prototype.isUsingAnotherMediaElement=Xs.prototype.isUsingAnotherMediaElement;Xs.prototype.hasCustomClick=Xs.prototype.hasCustomClick;Xs.prototype.isClientRendering=Xs.prototype.isClientRendering;Xs.prototype.needsSkipUI=Xs.prototype.needsSkipUI;function Ys(a,b,c,d){var e=this;this.L=null;this.m=a;this.D=b;this.g=c;this.G=null;this.A=!0;this.h=this.g;this.oa=d;this.aa=new Set;this.R=new Set;this.H=new Set;this.F=new Map;this.K=new Map;this.i=new X;Zs(this);this.I=new Wc;this.j=new Wc;this.J=!1;this.W=this.u=this.C=this.l=null;this.Z=!1;this.O=-1;this.V=function(){if(!e.J&&e.l&&!e.D.Da()){e.l=e.g.currentTime;var f=$s(e);f&&at(e,f,1,1,Date.now())}};this.T=function(){if(!(e.J||e.l||e.D.Da())){e.l=e.g.currentTime;var f=$s(e,!0);f||(f=$s(e));
f&&at(e,f,1,1,Date.now())}};this.ea=function(){if(!e.J&&e.l&&!e.D.Da()){var f=e.g.currentTime;e.C&&!e.C.pre&&!e.C.post&&f<(e.C.endTime||e.C.startTime)&&(e.C=null)}};this.P=new Gf(this.V);this.M=new Gf(function(){var f,g,h,k,l,m,n,q,r,t,v;return Q(function(w){switch(w.g){case 1:if(!e.H.size||e.l==null){w.B(0);break}f=e.D.l;if(f==mr||f==cr)return w.return();g=!1;h=Array.from(e.H);k=e.D.wa();l=u(h);m=l.next();case 3:if(m.done){w.B(5);break}n=m.value;if(n==e.C){w.B(4);break}q=n.endTime||n.startTime;if(!(k.start-
q>=1)){r=n.startTime-e.l;r>0&&r<=10&&(!e.F.has(n)&&bt(n)&&e.F.set(n,e.i.preload(n.uri,null,n.mimeType||void 0)),ct(e,n));w.B(4);break}if(!e.F.has(n)){w.B(7);break}return E(w,e.F.get(n),8);case 8:(t=w.h)&&t.destroy(),e.F.delete(n);case 7:dt(e,n),v=n.id||JSON.stringify(n),e.R.has(v)&&e.R.delete(v),e.H.delete(n),et(e),n.overlay||(g=!0);case 4:m=l.next();w.B(3);break;case 5:g&&ft(e),H(w)}})});this.configure(this.D.getConfiguration().ads)}p=Ys.prototype;p.configure=function(a){this.L=a;gt(this)};
function ht(a){if(!a.Z&&a.H.size){a.I.o(a.g,"playing",a.T);a.I.o(a.g,"timeupdate",a.T);a.I.o(a.g,"seeked",a.ea);a.I.o(a.g,"ended",a.V);if("requestVideoFrameCallback"in a.g&&!it()){var b=a.g,c=function(){a.O!=-1&&(a.V(),a.O!=-1&&(a.O=b.requestVideoFrameCallback(c)))};a.O=b.requestVideoFrameCallback(c)}else a.P.xa(.025);a.M&&a.M.xa(1);a.Z=!0}}
function et(a){a.Z&&!a.H.size&&(a.I.Ea(a.g,"playing",a.T),a.I.Ea(a.g,"timeupdate",a.T),a.I.Ea(a.g,"seeked",a.ea),a.I.Ea(a.g,"ended",a.V),a.O!=-1&&(a.g.cancelVideoFrameCallback(a.O),a.O=-1),a.P&&a.P.stop(),a.M&&a.M.stop(),a.Z=!1)}
function gt(a){if(a.m&&a.L){var b=a.L.supportsMultipleMediaElements,c=a.g;c.controls?b=!1:c.webkitPresentationMode&&c.webkitPresentationMode!=="inline"?b=!1:c.webkitDisplayingFullscreen&&(b=!1);a.A==b&&(a.A=!b,a.A?(a.h=a.g,a.G&&(a.G.parentElement&&a.m.removeChild(a.G),a.G=null)):(a.G||(b=document.createElement(a.g.tagName),b.autoplay=!0,b.style.position="absolute",b.style.top="0",b.style.left="0",b.style.width="100%",b.style.height="100%",b.style.display="none",b.setAttribute("playsinline",""),a.G=
b),a.h=a.G))}else a.A=!0}
p.stop=function(){this.j&&this.j.Sa();this.aa.clear();this.R.clear();this.H.clear();this.i.Wg();if(this.F.size){var a=Array.from(this.F.values());a=u(a);for(var b=a.next();!b.done;b=a.next())(b=b.value)&&b.then(function(c){c&&c.destroy()})}this.F.clear();if(this.K.size)for(a=Array.from(this.K.keys()),a=u(a),b=a.next();!b.done;b=a.next())dt(this,b.value);this.K.clear();this.i.detach();this.J=!1;this.C=this.l=null;this.A=!0;this.h=this.g;this.G=null;jt(this);et(this);this.m&&bk(this.m);this.u&&(this.u.stop(),
this.u=null)};p.release=function(){this.stop();this.I&&this.I.release();this.j&&this.j.release();this.P&&(this.P.stop(),this.P=null);this.M&&(this.M.stop(),this.M=null);this.i.destroy()};p.Yb=function(){return this.i};
function kt(a,b){var c,d,e;Q(function(f){if(f.g==1){c=null;if(d=b.values.find(function(g){return g.key=="ID"}))c=d.data;if(c){if(a.aa.has(c))return f.return();a.aa.add(c)}Zs(a);e=[];return b&&b.values.find(function(g){return g.key=="X-OVERLAY-ID"})?(e=lt(b),f.B(2)):E(f,mt(a,b),3)}f.g!=2&&(e=f.h);e.length?nt(a,e):bb("Unsupported HLS interstitial",b);H(f)})}
function ot(a,b){var c=Zd(b.eventNode,"OverlayEvent"),d=c.attributes.uri,e=c.attributes.mimeType,f=c.attributes.loop=="true",g=be(c,"z",he);if(d&&g!=0){var h=null,k=Zd(c,"Background");if(k){var l=k.attributes.uri;l?h="center / contain no-repeat url('"+l+"')":h=Xd(k)}k=1920;l=1080;var m=Zd(c,"Viewport");if(m){k=be(m,"x",he);if(k==null)return;l=be(m,"y",he);if(l==null)return}var n={viewport:{x:k,y:l},topLeft:{x:0,y:0},size:{x:k,y:l}},q=Zd(c,"Overlay");if(m&&q){var r=Zd(q,"TopLeft"),t=Zd(q,"Size");if(r&&
t){q=be(r,"x",he);if(q==null)return;r=be(r,"y",he);if(r==null)return;var v=be(t,"x",he);if(v==null)return;t=be(t,"y",he);if(t==null)return;n.topLeft.x=q;n.topLeft.y=r;n.size.x=v;n.size.y=t}}q=null;c=Zd(c,"Squeeze");if(m&&c&&(t=Zd(c,"TopLeft"),c=Zd(c,"Size"),t&&c)){m=be(t,"x",he);if(m==null)return;q=be(t,"y",he);if(q==null)return;t=be(c,"x",he);if(t==null)return;c=be(c,"y",he);if(c==null)return;q={viewport:{x:k,y:l},topLeft:{x:m,y:q},size:{x:t,y:c}}}nt(a,[{id:b.id,groupId:null,startTime:b.startTime,
endTime:b.endTime,uri:d,mimeType:e,isSkippable:!1,skipOffset:null,skipFor:null,canJump:!0,resumeOffset:null,playoutLimit:null,once:!1,pre:!1,post:!1,timelineRange:!0,loop:f,overlay:n,displayOnBackground:g==-1,currentVideo:q,background:h,clickThroughUrl:null}])}}
p.addAdUrlInterstitial=function(a){var b=this,c,d,e,f,g,h,k,l,m;return Q(function(n){if(n.g==1)return c={type:12},E(n,pt(b,a,c),2);if(n.g!=3){d=n.h;e=Nd(d,"VAST,vmap:VMAP");if(!e)throw new U(2,10,10007);f=[];if(e.tagName=="VAST")return f=Ns(e,b.l),n.B(3);if(e.tagName!="vmap:VMAP")return n.B(3);g=function(q){var r,t;return Q(function(v){if(v.g==1)return E(v,pt(b,q.uri,c),2);r=v.h;t=Nd(r,"VAST");if(!t)throw new U(2,10,10007);f.push.apply(f,x(Ns(t,q.time)));H(v)})};h=[];k=u(Ps(e));for(l=k.next();!l.done;l=
k.next())m=l.value,h.push(g(m));return h.length?E(n,Promise.all(h),3):n.B(3)}nt(b,f);H(n)})};
function nt(a,b){var c,d,e,f,g,h,k,l;Q(function(m){switch(m.g){case 1:c=!1,d=u(b),e=d.next();case 2:if(e.done){m.B(4);break}f=e.value;if(!f.uri){bb("Missing URL in interstitial",f);m.B(3);break}if(f.mimeType){m.B(5);break}sa(m,6);g=a.i.Xb();return E(m,bp(f.uri,g,a.D.getConfiguration().streaming.retryParameters),8);case 8:f.mimeType=m.h;ua(m,5);break;case 6:va(m);case 5:h=f.id||JSON.stringify(f);if(a.R.has(h)){m.B(3);break}f.loop&&!f.overlay&&bb("Loop is only supported in overlay interstitials",f);
f.overlay||(c=!0);a.R.add(h);a.H.add(f);k=!1;f.pre&&a.l==null?k=!0:f.startTime!=0||f.canJump?a.l!=null&&(l=f.startTime-a.l,l>0&&l<=10&&(k=!0)):k=!0;k&&(!a.F.has(f)&&bt(f)&&a.F.set(f,a.i.preload(f.uri,null,f.mimeType||void 0)),ct(a,f));case 3:e=d.next();m.B(2);break;case 4:c&&ft(a),ht(a),H(m)}})}
function $s(a,b,c){b=b===void 0?!1:b;c=c===void 0?null:c;var d=0,e=null;if(a.H.size&&a.l!=null){var f=a.g.ended,g=Array.from(a.H).sort(function(n,q){return q.startTime-n.startTime}),h=g;h=b?g.filter(function(n){return n.pre}):f?g.filter(function(n){return n.post}):g.filter(function(n){return!n.pre&&!n.post});g=u(h);for(h=g.next();!h.done;h=g.next()){h=h.value;var k=!1;if(b)k=h.pre;else if(f)k=h.post;else if(!h.pre&&!h.post){var l=a.l-Math.round(h.startTime*1E3)/1E3,m=1;a.L.allowStartInMiddleOfInterstitial&&
h.endTime&&h.endTime!=Infinity&&(m=h.endTime-h.startTime);(l>0||l==0&&a.l==0)&&(l<=m||!h.canJump)&&(k=c==null&&a.C&&!a.C.pre&&!a.C.post&&a.C.startTime>=h.startTime?!1:!0)}k&&(!a.C||h.startTime>=a.C.startTime)&&(d==(c||0)?e=h:e&&!h.canJump&&Math.round(h.startTime*1E3)/1E3-Math.round(e.startTime*1E3)/1E3>.001&&(e=h,d=0),d++)}}return e}
function at(a,b,c,d,e,f){f=f===void 0?0:f;a.C=b;gt(a);a.A||!a.m||a.h.parentElement||a.m.appendChild(a.h);d==1&&c==1&&(c=Array.from(a.H).filter(function(g){return b.pre?g.pre==b.pre:b.post?g.post==b.post:Math.abs(g.startTime-b.startTime)<.001}).length);b.once&&(f++,a.H.delete(b),et(a),b.overlay||ft(a));b.mimeType&&(b.mimeType.startsWith("image/")||b.mimeType==="text/html")?b.overlay?qt(a,b,c,d,f):bb("Unsupported interstitial",b):a.A&&b.overlay?bb("Unsupported interstitial",b):rt(a,b,c,d,e,f)}
function qt(a,b,c,d,e){function f(){a.u&&(a.u.stop(),a.u=null);a.m.removeChild(k);jt(a,b);st(a,"ad-stopped");a.j.Sa();var q=$s(a,b.pre,d-e);q?at(a,q,c,++d,Date.now(),e):a.J=!1}a.J=!0;var g=b.overlay,h=b.mimeType=="text/html"?"iframe":"img",k=document.createElement(h);k.style.objectFit="contain";k.style.position="absolute";k.style.border="none";tt(a,b);var l=new Xs(b,c,d);st(a,"ad-impression");st(a,"ad-started",(new Map).set("ad",l));h=="iframe"?k.src=b.uri:(k.src=b.uri,k.onerror=function(q){st(a,
"ad-error",(new Map).set("originalEvent",q));f()});l=g.viewport;var m=g.topLeft;g=g.size;l.x==0&&l.y==0?(k.width=b.overlay.size.x,k.height=b.overlay.size.y,k.style.bottom="10%",k.style.left="0",k.style.right="0",k.style.width="100%",b.overlay.size.y||h!="iframe"||(k.style.height="auto")):(k.style.height=g.y/l.y*100+"%",k.style.left=m.x/l.x*100+"%",k.style.top=m.y/l.y*100+"%",k.style.width=g.x/l.x*100+"%");a.m.appendChild(k);var n=Date.now();a.u&&a.u.stop();a.u=new Gf(function(){b.playoutLimit&&(Date.now()-
n)/1E3>b.playoutLimit?(st(a,"ad-complete"),f()):b.endTime&&a.g.currentTime>b.endTime?(st(a,"ad-complete"),f()):a.g.currentTime<b.startTime&&(st(a,"ad-skipped"),f())});b.playoutLimit&&!b.endTime?a.u.Y(b.playoutLimit):b.endTime&&a.u.xa(.025);a.j.o(a.g,"seeked",function(){var q=a.g.currentTime;if(q<b.startTime||b.endTime&&q>b.endTime)a.u&&a.u.stop(),st(a,"ad-skipped"),f()});b.clickThroughUrl&&a.j.o(k,"click",function(){b.clickThroughUrl&&window.open(b.clickThroughUrl,"_blank")})}
function rt(a,b,c,d,e,f){var g,h,k,l,m,n,q,r,t,v,w,z,y,A,C,F,D,B,G,K,I;Q(function(J){switch(J.g){case 1:g=Date.now();a.J=!0;h=!1;k=function(){if(!a.A&&!b.overlay&&b.resumeOffset==null)if(b.timelineRange&&b.endTime&&b.endTime!=Infinity)a.g.currentTime!=b.endTime&&(a.g.currentTime=b.endTime);else{var L=Date.now();a.g.currentTime+=(L-e)/1E3;e=L}};l=function(L){var N,P;return Q(function(O){if(O.g==1){k();N=$s(a,b.pre,d-f);if(L&&b.groupId)for(;N&&N.groupId==b.groupId;)d++,N=$s(a,b.pre,d-f);a.u&&(!b.groupId||
N&&N.groupId!=b.groupId)&&(a.u.stop(),a.u=null);jt(a,b);if(N&&!N.overlay)return O.B(2);b.post&&(a.l=null,a.C=null);return a.A?E(O,a.i.detach(),4):E(O,a.i.vc(),4)}O.g!=2&&(a.A&&(P=b.resumeOffset,P==null&&(P=b.timelineRange&&b.endTime&&b.endTime!=Infinity?b.endTime-(a.l||0):(Date.now()-e)/1E3),st(a,"ad-content-resume-requested",(new Map).set("offset",P))),st(a,"ad-stopped"),a.j.Sa(),a.J=!1,a.A?ft(a):(a.h.style.display="none",k(),a.g.ended||a.g.play()));gt(a);N&&(st(a,"ad-stopped"),a.j.Sa(),at(a,N,c,
++d,e,f));H(O)})};m=function(L){return Q(function(N){if(h)return N.return();h=!0;st(a,"ad-error",(new Map).set("originalEvent",L));return E(N,l(!1),0)})};n=function(){return Q(function(L){if(L.g==1){if(h)return L.return();h=!0;return E(L,l(!1),2)}st(a,"ad-complete");H(L)})};a.W=function(){return Q(function(L){if(h)return L.return();h=!0;st(a,"ad-skipped");return E(L,l(!0),0)})};q=new Ws(a.h,b,a.W,c,d,!a.A);a.A||(q.setMuted(a.g.muted),q.setVolume(a.g.volume));st(a,"ad-started",(new Map).set("ad",q));
(r=q.canSkipNow())&&st(a,"ad-skip-state-changed");a.j.ua(a.i,"error",m);a.j.o(a.h,"timeupdate",function(){if(a.h.duration){var L=q.canSkipNow();r!=L&&q.getRemainingTime()>0&&q.getDuration()>0&&st(a,"ad-skip-state-changed");r=L;!a.A&&!b.overlay&&b.resumeOffset==null&&b.timelineRange&&b.endTime&&b.endTime!=Infinity&&a.g.currentTime!=b.endTime&&a.D.wa().end>=b.endTime&&(a.g.currentTime=b.endTime)}});a.j.ua(a.i,"firstquartile",function(){k();st(a,"ad-first-quartile")});a.j.ua(a.i,"midpoint",function(){k();
st(a,"ad-midpoint")});a.j.ua(a.i,"thirdquartile",function(){k();st(a,"ad-third-quartile")});a.j.ua(a.i,"complete",n);a.j.o(a.h,"play",function(){st(a,"ad-resumed")});a.j.o(a.h,"pause",function(){var L=a.i.getConfiguration();a.h.currentTime>=L.playRangeEnd?n():st(a,"ad-paused")});a.j.o(a.h,"volumechange",function(){a.h.muted?st(a,"ad-muted"):st(a,"ad-volume-changed")});b.clickThroughUrl&&(t=a.m||a.h,a.j.o(t,"click",function(){b.clickThroughUrl&&(q.isPaused()||q.pause(),window.open(b.clickThroughUrl,
"_blank"))}));if(!a.A||d!=1){J.B(2);break}st(a,"ad-content-pause-requested",(new Map).set("saveLivePosition",!0));v=new Kg;w=function(L){return Q(function(N){if(N.g==1)return L.state!="detach"?N.B(0):it()?E(N,new Promise(function(P){return(new Gf(P)).Y(.1)}),3):N.B(3);v.resolve();a.j.Ea(a.D,"onstatechange",w);H(N)})};a.j.o(a.D,"onstatechange",w);return E(J,v,2);case 2:return tt(a,b),a.A||(a.h.style.display="",b.overlay?(a.h.loop=b.loop,z=b.overlay.viewport,y=b.overlay.topLeft,A=b.overlay.size,a.h.style.height=
A.y/z.y*100+"%",a.h.style.left=y.x/z.x*100+"%",a.h.style.top=y.y/z.y*100+"%",a.h.style.width=A.x/z.x*100+"%"):(a.g.pause(),b.resumeOffset!=null&&b.resumeOffset!=0&&(a.g.currentTime+=b.resumeOffset),a.h.loop=!1,a.h.style.height="100%",a.h.style.left="0",a.h.style.top="0",a.h.style.width="100%")),sa(J,4),Zs(a),b.startTime&&b.endTime&&b.endTime!=Infinity&&b.startTime!=b.endTime&&(C=b.endTime-b.startTime,C>0&&a.i.configure("playRangeEnd",C)),b.playoutLimit&&!a.u&&(a.u=(new Gf(function(){a.W()})).Y(b.playoutLimit),
a.i.configure("playRangeEnd",b.playoutLimit)),E(J,a.i.ec(a.h),6);case 6:return F=null,a.L.allowStartInMiddleOfInterstitial&&a.l!=null&&(D=a.l-b.startTime,Math.abs(D)>.25&&(F=D)),a.F.has(b)?E(J,a.F.get(b),10):E(J,a.i.load(b.uri,F,b.mimeType||void 0),8);case 10:return B=J.h,a.F.delete(b),B?E(J,a.i.load(B),8):E(J,a.i.load(b.uri,F,b.mimeType||void 0),8);case 8:b.overlay&&a.g.paused?a.h.pause():a.h.play();G=(Date.now()-g)/1E3;st(a,"ads-loaded",(new Map).set("loadTime",G));a.A&&a.g.play();b.overlay&&(b.pre||
b.post||a.D.U()&&!(b.startTime>0)||(K=function(){var L=a.g.currentTime-b.startTime;Math.abs(L-a.h.currentTime)>.1&&(a.h.currentTime=L)},a.j.ua(a.h,"playing",K),a.j.o(a.g,"seeking",K)),a.j.o(a.g,"seeked",function(){var L=a.g.currentTime;(L<b.startTime||b.endTime&&L>b.endTime)&&a.W()}));ua(J,0);break;case 4:I=va(J);if(!a.J)return J.return();m(I);H(J)}})}
function tt(a,b){b.displayOnBackground&&(a.g.style.zIndex="1");if(b.currentVideo!=null){var c=b.currentVideo;a.g.style.transformOrigin="top left";var d=!0,e=[],f=c.topLeft.x/c.viewport.x*100;f>0&&f<=100&&(e.push("translateX("+f+"%)"),d=!1);f=c.topLeft.y/c.viewport.y*100;f>0&&f<=100&&(e.push("translateY("+f+"%)"),d=!1);f=c.size.x/c.viewport.x;f<1&&e.push("scaleX("+f+")");c=c.size.y/c.viewport.y;f<1&&e.push("scaleY("+c+")");e.length&&(a.g.style.transform=e.join(" "));d&&(a.g.style.transition="transform 250ms")}a.m&&
(b.clickThroughUrl?(a.m.setAttribute("ad-active","true"),a.m.style.pointerEvents=""):a.m.style.pointerEvents="none",b.background&&(a.m.style.background=b.background));a.G&&(a.G.style.background=b.overlay?"":"rgb(0, 0, 0)")}
function jt(a,b){if(!b||b.displayOnBackground)a.g.style.zIndex="";b&&b.currentVideo==null||(a.g.style.transformOrigin="",a.g.style.transition="",a.g.style.transform="");a.m&&(a.m.removeAttribute("ad-active"),a.m.style.pointerEvents="",!b||b.background)&&(a.m.style.background="");a.G&&(a.G.style.background="")}
function mt(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,t,v,w,z,y,A,C,F,D,B,G,K,I,J,L,N,P,O,M,R,V,xa,ba,Oa,Ha,Ia,Fa,wa,Ca,Ma;return Q(function(La){switch(La.g){case 1:c=[];if(!b)return La.return(c);d=b.values.find(function(Ba){return Ba.key=="X-ASSET-URI"});e=b.values.find(function(Ba){return Ba.key=="X-ASSET-LIST"});if(!d&&!e)return La.return(c);f=null;if(g=b.values.find(function(Ba){return Ba.key=="ID"}))f=g.data;h=f==null?Math.floor(b.startTime*10)/10:b.startTime;(k=b.endTime)&&b.endTime!=Infinity&&typeof b.endTime==
"number"&&(k=f==null?Math.floor(b.endTime*10)/10:b.endTime);l=b.values.find(function(Ba){return Ba.key=="X-RESTRICT"});n=m=!0;l&&l.data&&(q=l.data,m=!q.includes("SKIP"),n=!q.includes("JUMP"));r=m?0:null;if(t=b.values.find(function(Ba){return Ba.key=="X-ENABLE-SKIP-AFTER"}))v=t.data,r=parseFloat(v),isNaN(r)&&(r=m?0:null);w=null;if(z=b.values.find(function(Ba){return Ba.key=="X-ENABLE-SKIP-FOR"}))y=z.data,w=parseFloat(y),isNaN(r)&&(w=null);A=null;if(C=b.values.find(function(Ba){return Ba.key=="X-RESUME-OFFSET"}))F=
C.data,A=parseFloat(F),isNaN(A)&&(A=null);D=null;if(B=b.values.find(function(Ba){return Ba.key=="X-PLAYOUT-LIMIT"}))G=B.data,D=parseFloat(G),isNaN(D)&&(D=null);J=I=K=!1;if(L=b.values.find(function(Ba){return Ba.key=="CUE"}))N=L.data,K=N.includes("ONCE"),I=N.includes("PRE"),J=N.includes("POST");P=!1;(O=b.values.find(function(Ba){return Ba.key=="X-TIMELINE-OCCUPIES"}))?(M=O.data,P=M.includes("RANGE")):!C&&a.D.U()&&(P=!I&&!J);if(d){R=d.data;if(!R)return La.return(c);c.push({id:f,groupId:null,startTime:h,
endTime:k,uri:R,mimeType:null,isSkippable:m,skipOffset:r,skipFor:w,canJump:n,resumeOffset:A,playoutLimit:D,once:K,pre:I,post:J,timelineRange:P,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null,clickThroughUrl:null});La.B(2);break}if(!e){La.B(2);break}V=e.data;if(!V)return La.return(c);sa(La,4);xa={type:11};return E(La,pt(a,V,xa),6);case 6:ba=La.h;Oa=Yb(ba);Ha=JSON.parse(Oa);if(Ia=Ha["SKIP-CONTROL"])Fa=Ia["ENABLE-SKIP-AFTER"],typeof Fa=="number"&&(r=parseFloat(Fa),isNaN(Fa)&&
(r=m?0:null)),wa=Ia["ENABLE-SKIP-FOR"],typeof wa=="number"&&(w=parseFloat(wa),isNaN(wa)&&(w=null));for(Ca=0;Ca<Ha.ASSETS.length;Ca++)Ma=Ha.ASSETS[Ca],Ma.URI&&c.push({id:f+"_shaka_asset_"+Ca,groupId:f,startTime:h,endTime:k,uri:Ma.URI,mimeType:null,isSkippable:m,skipOffset:r,skipFor:w,canJump:n,resumeOffset:A,playoutLimit:D,once:K,pre:I,post:J,timelineRange:P,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null,clickThroughUrl:null});ua(La,2);break;case 4:va(La);case 2:return La.return(c)}})}
function lt(a){var b=[];if(!a)return b;var c=a.values.find(function(w){return w.key=="X-ASSET-URI"});if(!c)return b;c=c.data;if(!c)return b;var d=null,e=a.values.find(function(w){return w.key=="X-OVERLAY-ID"});e&&(d=e.data);e=d==null?Math.floor(a.startTime*10)/10:a.startTime;var f=a.endTime;a.endTime&&a.endTime!=Infinity&&typeof a.endTime=="number"&&(f=d==null?Math.floor(a.endTime*10)/10:a.endTime);var g=!1,h=!1,k=!1,l=a.values.find(function(w){return w.key=="CUE"});l&&(k=l.data,g=k.includes("ONCE"),
h=k.includes("PRE"),k=k.includes("POST"));l=null;var m=a.values.find(function(w){return w.key=="X-ASSET-MIMETYPE"});m&&(l=m.data);m=!1;var n=a.values.find(function(w){return w.key=="X-LOOP"});n&&(m=n.data=="YES");n=1;var q=a.values.find(function(w){return w.key=="X-DEPTH"});q&&(n=parseFloat(q.data),isNaN(n)&&(n=1));q=null;var r=a.values.find(function(w){return w.key=="X-BACKGROUND"});r&&(q=r.data);r=1920;var t=1080,v=a.values.find(function(w){return w.key=="X-VIEWPORT"});if(v){t=v.data.split("x");
if(t.length!=2)return b;r=parseFloat(t[0]);t=parseFloat(t[1])}r={viewport:{x:r,y:t},topLeft:{x:0,y:0},size:{x:r,y:t}};if(t=a.values.find(function(w){return w.key=="X-OVERLAY-POSITION"})){t=t.data.split("x");if(t.length!=2)return b;r.topLeft.x=parseFloat(t[0]);r.topLeft.y=parseFloat(t[1])}if(t=a.values.find(function(w){return w.key=="X-OVERLAY-SIZE"})){t=t.data.split("x");if(t.length!=2)return b;r.size.x=parseFloat(t[0]);r.size.y=parseFloat(t[1])}t=null;if(v=a.values.find(function(w){return w.key==
"X-SQUEEZECURRENT"}))if(t=parseFloat(v.data),isNaN(t)&&(t=1),t={viewport:{x:1920,y:1080},topLeft:{x:0,y:0},size:{x:1920*t,y:1080*t}},a=a.values.find(function(w){return w.key=="X-SQUEEZECURRENT-POSITION"})){a=a.data.split("x");if(a.length!=2)return b;t.topLeft.x=parseFloat(a[0]);t.topLeft.y=parseFloat(a[1])}b.push({id:d,groupId:null,startTime:e,endTime:f,uri:c,mimeType:l,isSkippable:!1,skipOffset:null,skipFor:null,canJump:!0,resumeOffset:null,playoutLimit:null,once:g,pre:h,post:k,timelineRange:!0,
loop:m,overlay:r,displayOnBackground:n==-1,currentVideo:t,background:q,clickThroughUrl:null});return b}
function ft(a){for(var b=[],c=u(a.H),d=c.next(),e={};!d.done;e={Mc:void 0},d=c.next())d=d.value,d.overlay||(e.Mc={start:d.startTime,end:null},d.pre?(e.Mc.start=0,e.Mc.end=null):d.post?(e.Mc.start=-1,e.Mc.end=null):d.timelineRange&&(e.Mc.end=d.endTime),b.find(function(f){return function(g){return f.Mc.start==g.start&&f.Mc.end==g.end}}(e))||b.push(e.Mc));st(a,"ad-cue-points-changed",(new Map).set("cuepoints",b))}
function Zs(a){a.i.configure(a.D.$i());a.i.configure("ads.disableHLSInterstitial",!0);a.i.configure("ads.disableDASHInterstitial",!0);a.i.configure("playRangeEnd",Infinity);ih(a.D.Xb(),a.i.Xb())}function pt(a,b,c){var d,e,f;return Q(function(g){if(g.g==1)return d=jh([b],Ug()),e=a.D.Xb().request(7,d,c),E(g,e.promise,2);f=g.h;return g.return(f.data)})}function bt(a){return(a=a.mimeType)?!a.startsWith("image/")&&a!=="text/html":!0}
function it(){var a=Tb().Oa();return a=="TV"||a=="CONSOLE"||a=="CAST"?!0:!1}function ct(a,b){if(!(a.K.has(b)||a.L&&!a.L.allowPreloadOnDomElements)){var c=function(f){var g=document.createElement("link");g.rel="preload";g.href=f;g.as="image";document.head.appendChild(g);return g},d=[];if(b.background){var e=b.background.match(/url\(('|")?([^'"()]+)('|")\)?/);e&&d.push(c(e[2]))}b.mimeType&&b.mimeType.startsWith("image/")&&d.push(c(b.uri));a.K.set(b,d)}}
function dt(a,b){if(a.K.has(b)){var c=a.K.get(b);c=u(c);for(var d=c.next();!d.done;d=c.next())d=d.value,d.parentNode.removeChild(d);a.K.delete(b)}}function st(a,b,c){a.oa(new T(b,c))};function ut(a,b,c,d,e){this.h=a;this.j=Id(this.h.skipOffset);this.g=e;this.i=b;this.l=c;this.u=d;this.m=!1}p=ut.prototype;p.needsSkipUI=function(){return!0};p.isClientRendering=function(){return!1};p.hasCustomClick=function(){return!1};p.isUsingAnotherMediaElement=function(){return!1};p.getDuration=function(){return this.h.durationInSeconds};p.getMinSuggestedDuration=function(){return this.getDuration()};p.getRemainingTime=function(){return this.h.startTimeInSeconds+this.h.durationInSeconds-this.g.currentTime};
p.isPaused=function(){return this.g.paused};p.isSkippable=function(){return typeof this.j=="number"?!0:!1};p.getTimeUntilSkippable=function(){if(typeof this.j!="number")return this.getRemainingTime();var a=this.getRemainingTime()+this.j-this.getDuration();return Math.max(a,0)};p.canSkipNow=function(){return this.getTimeUntilSkippable()==0};p.skip=function(){this.m=!0;this.g.currentTime+=this.getRemainingTime()};p.pause=function(){return this.g.pause()};p.play=function(){return this.g.play()};
p.getVolume=function(){return this.g.volume};p.setVolume=function(a){this.g.volume=a};p.isMuted=function(){return this.g.muted};p.isLinear=function(){return this.u};p.resize=function(){};p.setMuted=function(a){this.g.muted=a};p.getSequenceLength=function(){return this.l?this.l:1};p.getPositionInSequence=function(){return this.i?this.i:1};p.getTitle=function(){return this.h.adTitle};p.getDescription=function(){return""};p.getVastMediaBitrate=function(){return 0};p.getVastMediaHeight=function(){return 0};
p.getVastMediaWidth=function(){return 0};p.getVastAdId=function(){return this.h.vastAdId||""};p.getAdId=function(){return this.h.adId};p.getCreativeAdId=function(){return this.h.creativeId};p.getAdvertiserName=function(){return""};p.getMediaUrl=function(){return null};p.getTimeOffset=function(){return 0};p.getPodIndex=function(){return 0};p.release=function(){this.l=this.i=this.g=this.h=null};S("shaka.ads.MediaTailorAd",ut);ut.prototype.release=ut.prototype.release;ut.prototype.getPodIndex=ut.prototype.getPodIndex;
ut.prototype.getTimeOffset=ut.prototype.getTimeOffset;ut.prototype.getMediaUrl=ut.prototype.getMediaUrl;ut.prototype.getAdvertiserName=ut.prototype.getAdvertiserName;ut.prototype.getCreativeAdId=ut.prototype.getCreativeAdId;ut.prototype.getAdId=ut.prototype.getAdId;ut.prototype.getVastAdId=ut.prototype.getVastAdId;ut.prototype.getVastMediaWidth=ut.prototype.getVastMediaWidth;ut.prototype.getVastMediaHeight=ut.prototype.getVastMediaHeight;ut.prototype.getVastMediaBitrate=ut.prototype.getVastMediaBitrate;
ut.prototype.getDescription=ut.prototype.getDescription;ut.prototype.getTitle=ut.prototype.getTitle;ut.prototype.getPositionInSequence=ut.prototype.getPositionInSequence;ut.prototype.getSequenceLength=ut.prototype.getSequenceLength;ut.prototype.setMuted=ut.prototype.setMuted;ut.prototype.resize=ut.prototype.resize;ut.prototype.isLinear=ut.prototype.isLinear;ut.prototype.isMuted=ut.prototype.isMuted;ut.prototype.setVolume=ut.prototype.setVolume;ut.prototype.getVolume=ut.prototype.getVolume;
ut.prototype.play=ut.prototype.play;ut.prototype.pause=ut.prototype.pause;ut.prototype.skip=ut.prototype.skip;ut.prototype.canSkipNow=ut.prototype.canSkipNow;ut.prototype.getTimeUntilSkippable=ut.prototype.getTimeUntilSkippable;ut.prototype.isSkippable=ut.prototype.isSkippable;ut.prototype.isPaused=ut.prototype.isPaused;ut.prototype.getRemainingTime=ut.prototype.getRemainingTime;ut.prototype.getMinSuggestedDuration=ut.prototype.getMinSuggestedDuration;ut.prototype.getDuration=ut.prototype.getDuration;
ut.prototype.isUsingAnotherMediaElement=ut.prototype.isUsingAnotherMediaElement;ut.prototype.hasCustomClick=ut.prototype.hasCustomClick;ut.prototype.isClientRendering=ut.prototype.isClientRendering;ut.prototype.needsSkipUI=ut.prototype.needsSkipUI;function vt(a,b,c,d){this.D=a;this.K=b;this.h=c;this.l=null;this.P=NaN;this.i=d;this.J=!1;this.C=null;this.j=[];this.M=[];this.L=this.F=this.g=null;this.G=new Map;this.m=[];this.A=[];this.H="";this.O=!0;this.I="";this.u=new Wc}vt.prototype.stop=function(){for(var a=u(this.m),b=a.next();!b.done;b=a.next())b=b.value,this.u.Ea(b.target,b.type,b.listener);wt(this);this.m=[];this.A=[];this.H="";this.O=!0;this.I="";this.C=null;this.j=[];this.M=[];this.G.clear()};
vt.prototype.release=function(){this.stop();this.u&&this.u.release()};vt.prototype.onManifestUpdated=function(a){this.J=a;this.H!=""&&(xt(this,this.H,this.O),this.O=!1)};vt.prototype.getCuePoints=function(){for(var a=[],b=u(this.j),c=b.next();!c.done;c=b.next()){c=u(c.value.ads);for(var d=c.next();!d.done;d=c.next())d=d.value,a.push({start:d.startTimeInSeconds,end:d.startTimeInSeconds+d.durationInSeconds})}return a};
function yt(a,b,c){var d,e,f,g,h,k,l,m,n,q,r,t;Q(function(v){if(v.g==1)return d={type:7},e=jh([b],Ug()),e.method="POST",c&&(f=JSON.stringify(c),e.body=bc(f)),g=a.K.request(7,e,d),sa(v,2),E(v,g.promise,4);if(v.g!=2){h=v.h;k=Yb(h.data);l=JSON.parse(k);if(l.manifestUrl&&l.trackingUrl)m=new tb(b),n=new tb(l.trackingUrl),a.H=m.resolve(n).toString(),q=Date.now()/1E3,r=q-a.P,a.i(new T("ads-loaded",(new Map).set("loadTime",r))),t=new tb(l.manifestUrl),a.l.resolve(m.resolve(t).toString()),a.l=null;else throw Error("Insufficient data from MediaTailor.");
return ua(v,0)}va(v);if(!a.I.length)return a.l.reject("MediaTailor request returned an error and there was no backup asset uri provided."),a.l=null,v.return();a.l.resolve(a.I);a.l=null;H(v)})}
function xt(a,b,c){var d,e,f,g,h,k,l,m,n,q,r,t,v,w,z,y;Q(function(A){if(A.g==1)return d={type:8},e=jh([b],Ug()),f=a.K.request(7,e,d),sa(A,2),E(A,f.promise,4);if(A.g!=2){g=A.h;h=[];k=Yb(g.data);l=JSON.parse(k);if(l.avails.length>0){if(JSON.stringify(a.j)!=JSON.stringify(l.avails)){a.j=l.avails;m=u(a.j);for(n=m.next();!n.done;n=m.next())for(q=n.value,r=u(q.nonLinearAdsList),t=r.next();!t.done;t=r.next())for(v=t.value,w=u(v.nonLinearAdList),z=w.next();!z.done;z=w.next())y=z.value,zt(a,y);h=a.getCuePoints();
a.i(new T("ad-cue-points-changed",(new Map).set("cuepoints",h)))}}else a.j.length&&a.i(new T("ad-cue-points-changed",(new Map).set("cuepoints",h))),wt(a),a.j=[];c&&(a.J||h.length>0)&&At(a);return ua(A,0)}va(A);H(A)})}
function zt(a,b){var c,d,e,f,g,h,k,l,m;Q(function(n){if(n.g==1){if(!b.staticResource)return n.return();c=Bt(b);if(d=a.G.get(c))return n.return();e={type:9};f=jh([b.staticResource],Ug());g=a.K.request(7,f,e);sa(n,2);a.G.set(c,[]);return E(n,g.promise,4)}if(n.g!=2)return h=n.h,k=Yb(h.data),l=JSON.parse(k),m=l.apps,a.G.set(c,m),ua(n,0);va(n);a.G.delete(c);H(n)})}
function Bt(a){return[a.adId,a.adParameters,a.adSystem,a.adTitle,a.creativeAdId,a.creativeId,a.creativeSequence,a.height,a.width,a.staticResource].join("")}function At(a){Ct(a);a.J||(Dt(a),a.u.o(a.h,"seeked",function(){Dt(a)}),a.u.o(a.h,"ended",function(){wt(a)}));a.u.o(a.h,"timeupdate",function(){Ct(a)})}
function Dt(a){var b=a.h.currentTime;if(b!=0&&a.C==null){for(var c,d,e=u(a.j),f=e.next();!f.done;f=e.next()){f=f.value;for(var g=u(f.ads),h=g.next();!h.done;h=g.next())if(h=h.value,!d)h.startTimeInSeconds<b&&(d=h,c=f);else if(h.startTimeInSeconds<b&&h.startTimeInSeconds>d.startTimeInSeconds+d.durationInSeconds){d=h;c=f;break}}c&&d&&!a.M.includes(d.adId)&&(a.C=b,a.h.currentTime=c.startTimeInSeconds)}}
function Ct(a){if(a.h.duration&&(a.g||a.j.length)){var b=a.h.currentTime,c=!1;if(a.g){c=!0;var d=a.F,e=d.startTimeInSeconds+.5*d.durationInSeconds,f=d.startTimeInSeconds+.75*d.durationInSeconds;b>=d.startTimeInSeconds+.25*d.durationInSeconds&&!a.A.includes("firstQuartile")?(a.A.push("firstQuartile"),Et(a,"firstQuartile")):b>=e&&!a.A.includes("midpoint")?(a.A.push("midpoint"),Et(a,"midpoint")):b>=f&&!a.A.includes("thirdQuartile")&&(a.A.push("thirdQuartile"),Et(a,"thirdQuartile"));d=a.g.getRemainingTime();
e=a.g.getDuration();a.g.canSkipNow()&&d>0&&e>0&&Et(a,"skipStateChanged");e>0&&(d<=0||d>e)&&wt(a)}if(!a.g||!a.g.isLinear()){a:for(d=u(a.j),e=d.next();!e.done;e=d.next()){e=e.value;if(a.g&&a.g.isLinear())break;for(f=0;f<e.ads.length;f++){var g=e.ads[f],h=g.startTimeInSeconds+g.durationInSeconds;if(g.startTimeInSeconds<=b&&h>b){if(a.M.includes(g.adId)){if(a.h.ended)continue;a.h.currentTime=h;break a}wt(a);a.L=e;a.g=new ut(g,f+1,e.ads.length,!0,a.h);a.F=g;f===0&&Et(a,"breakStart");Ft(a);break}}}if(!a.g)for(d=
u(a.j),e=d.next();!e.done;e=d.next()){e=e.value;if(a.g)break;for(f=0;f<e.nonLinearAdsList.length;f++)if(g=e.nonLinearAdsList[f],g.nonLinearAdList.length){h=e.startTimeInSeconds;var k=a.G.get(Bt(g.nonLinearAdList[0]));if(h<=b&&k&&k.length){wt(a);h=a;k=u(k);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.data.source.length){var m=document.createElement("img");m.src=l.data.source[0].url;m.style.top=(l.placeholder.top||0)+"%";m.style.height=100-(l.placeholder.top||0)+"%";m.style.left=(l.placeholder.left||
0)+"%";m.style.maxWidth=100-(l.placeholder.left||0)+"%";m.style.objectFit="contain";m.style.position="absolute";h.D.appendChild(m)}a.L=e;a.g=new ut(g,f+1,e.ads.length,!1,a.h);a.F=g;f===0&&Et(a,"breakStart");Ft(a);break}}}c&&!a.g&&(b=a.h.currentTime,a.C&&a.C>b&&(a.h.currentTime=a.C),a.C=null)}}}
function wt(a){if(a.g){for(;a.D.lastChild;)a.D.removeChild(a.D.firstChild);a.J||a.M.push(a.F.adId);var b=a.g.m;(b===void 0?0:b)?Et(a,"skip"):Et(a,"complete");b=u(a.m);for(var c=b.next();!c.done;c=b.next())c=c.value,a.u.Ea(c.target,c.type,c.listener);a.m=[];a.A=[];b=a.g.getPositionInSequence();c=a.g.getSequenceLength();b===c&&Et(a,"breakEnd");a.g=null;a.F=null;a.L=null}}
function Ft(a){var b=!1;a.h.paused?b=!0:(Et(a,"impression"),Et(a,"start"));a.m.push({target:a.h,type:"volumechange",listener:function(){a.h.muted&&Et(a,"mute")}});a.m.push({target:a.h,type:"volumechange",listener:function(){a.h.muted||Et(a,"unmute")}});a.m.push({target:a.h,type:"play",listener:function(){b?(Et(a,"impression"),Et(a,"start"),b=!1):Et(a,"resume")}});a.m.push({target:a.h,type:"pause",listener:function(){Et(a,"pause")}});for(var c=u(a.m),d=c.next();!d.done;d=c.next())d=d.value,a.u.o(d.target,
d.type,d.listener)}
function Et(a,b){var c=a.F.trackingEvents.find(function(f){return f.eventType==b});c||(c=a.L.adBreakTrackingEvents.find(function(f){return f.eventType==b}));if(c){var d={type:10};c=u(c.beaconUrls);for(var e=c.next();!e.done;e=c.next())(e=e.value)&&e!=""&&(e=jh([e],Ug()),e.method="POST",a.K.request(7,e,d))}switch(b){case "impression":a.i(new T("ad-impression"));break;case "start":a.i(new T("ad-started",(new Map).set("ad",a.g)));break;case "mute":a.i(new T("ad-muted"));break;case "unmute":a.i(new T("ad-volume-changed"));break;
case "resume":a.i(new T("ad-resumed"));break;case "pause":a.i(new T("ad-paused"));break;case "firstQuartile":a.i(new T("ad-first-quartile"));break;case "midpoint":a.i(new T("ad-midpoint"));break;case "thirdQuartile":a.i(new T("ad-third-quartile"));break;case "complete":a.i(new T("ad-complete"));a.i(new T("ad-stopped"));break;case "skip":a.i(new T("ad-skipped"));a.i(new T("ad-stopped"));break;case "breakStart":a.D.setAttribute("ad-active","true");break;case "breakEnd":a.D.removeAttribute("ad-active");
break;case "skipStateChanged":a.i(new T("ad-skip-state-changed"))}};function Gt(a,b){this.g=a;this.i=null;this.h=b}p=Gt.prototype;p.needsSkipUI=function(){return!0};p.isClientRendering=function(){return!1};p.hasCustomClick=function(){return!0};p.isUsingAnotherMediaElement=function(){return!1};p.getDuration=function(){return this.i?this.i.duration:-1};p.getMinSuggestedDuration=function(){return this.getDuration()};p.getRemainingTime=function(){return this.i?this.i.duration-this.i.currentTime:-1};p.isPaused=function(){return this.h.paused};p.isSkippable=function(){return this.g.isSkippable()};
p.getTimeUntilSkippable=function(){var a=this.g.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};p.canSkipNow=function(){return this.getTimeUntilSkippable()==0};p.skip=function(){this.h.currentTime+=this.getRemainingTime()};p.pause=function(){return this.h.pause()};p.play=function(){return this.h.play()};p.getVolume=function(){return this.h.volume};p.setVolume=function(a){this.h.volume=a};p.isMuted=function(){return this.h.muted};p.isLinear=function(){return!0};p.resize=function(){};
p.setMuted=function(a){this.h.muted=a};p.getSequenceLength=function(){var a=this.g.getAdPodInfo();return a==null?1:a.getTotalAds()};p.getPositionInSequence=function(){var a=this.g.getAdPodInfo();return a==null?1:a.getAdPosition()};p.getTitle=function(){return this.g.getTitle()};p.getDescription=function(){return this.g.getDescription()};p.getVastMediaBitrate=function(){return 0};p.getVastMediaHeight=function(){return this.g.getVastMediaHeight()};p.getVastMediaWidth=function(){return this.g.getVastMediaWidth()};
p.getVastAdId=function(){return""};p.getAdId=function(){return this.g.getAdId()};p.getCreativeAdId=function(){return this.g.getCreativeAdId()};p.getAdvertiserName=function(){return this.g.getAdvertiserName()};p.getMediaUrl=function(){return null};p.getTimeOffset=function(){var a=this.g.getAdPodInfo();return a==null?0:a.getTimeOffset()};p.getPodIndex=function(){var a=this.g.getAdPodInfo();return a==null?0:a.getPodIndex()};p.release=function(){this.h=this.i=this.g=null};S("shaka.ads.ServerSideAd",Gt);
Gt.prototype.release=Gt.prototype.release;Gt.prototype.getPodIndex=Gt.prototype.getPodIndex;Gt.prototype.getTimeOffset=Gt.prototype.getTimeOffset;Gt.prototype.getMediaUrl=Gt.prototype.getMediaUrl;Gt.prototype.getAdvertiserName=Gt.prototype.getAdvertiserName;Gt.prototype.getCreativeAdId=Gt.prototype.getCreativeAdId;Gt.prototype.getAdId=Gt.prototype.getAdId;Gt.prototype.getVastAdId=Gt.prototype.getVastAdId;Gt.prototype.getVastMediaWidth=Gt.prototype.getVastMediaWidth;
Gt.prototype.getVastMediaHeight=Gt.prototype.getVastMediaHeight;Gt.prototype.getVastMediaBitrate=Gt.prototype.getVastMediaBitrate;Gt.prototype.getDescription=Gt.prototype.getDescription;Gt.prototype.getTitle=Gt.prototype.getTitle;Gt.prototype.getPositionInSequence=Gt.prototype.getPositionInSequence;Gt.prototype.getSequenceLength=Gt.prototype.getSequenceLength;Gt.prototype.setMuted=Gt.prototype.setMuted;Gt.prototype.resize=Gt.prototype.resize;Gt.prototype.isLinear=Gt.prototype.isLinear;
Gt.prototype.isMuted=Gt.prototype.isMuted;Gt.prototype.setVolume=Gt.prototype.setVolume;Gt.prototype.getVolume=Gt.prototype.getVolume;Gt.prototype.play=Gt.prototype.play;Gt.prototype.pause=Gt.prototype.pause;Gt.prototype.skip=Gt.prototype.skip;Gt.prototype.canSkipNow=Gt.prototype.canSkipNow;Gt.prototype.getTimeUntilSkippable=Gt.prototype.getTimeUntilSkippable;Gt.prototype.isSkippable=Gt.prototype.isSkippable;Gt.prototype.isPaused=Gt.prototype.isPaused;Gt.prototype.getRemainingTime=Gt.prototype.getRemainingTime;
Gt.prototype.getMinSuggestedDuration=Gt.prototype.getMinSuggestedDuration;Gt.prototype.getDuration=Gt.prototype.getDuration;Gt.prototype.isUsingAnotherMediaElement=Gt.prototype.isUsingAnotherMediaElement;Gt.prototype.hasCustomClick=Gt.prototype.hasCustomClick;Gt.prototype.isClientRendering=Gt.prototype.isClientRendering;Gt.prototype.needsSkipUI=Gt.prototype.needsSkipUI;function Ht(a,b,c,d){var e=this;this.A=a;this.l=b;this.j=null;this.G=NaN;this.i=d;this.H=!1;this.C=this.m=this.u=null;this.D="";this.F=[];this.h=new Wc;a=new google.ima.dai.api.UiSettings;a.setLocale(c);this.g=new google.ima.dai.api.StreamManager(this.l,this.A,a);this.i(new T("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.g)));this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){It(e,f)});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.D.length?
e.j.resolve(e.D):e.j.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.j=null});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.m=new Gt(f,e.l);e.C&&(e.m.i=e.C);e.i(new T("ad-started",(new Map).set("ad",e.m)));e.A.setAttribute("ad-active","true")});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){e.A.removeAttribute("ad-active");
var f=e.l.currentTime;e.u&&e.u>f&&(e.l.currentTime=e.u,e.u=null)});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,function(f){e.C=f.getStreamData().adProgressData;e.m&&(e.m.i=e.C)});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){e.i(new T("ad-first-quartile"))});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){e.i(new T("ad-midpoint"))});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){e.i(new T("ad-third-quartile"))});
this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.i(new T("ad-complete"));e.i(new T("ad-stopped"));e.A.removeAttribute("ad-active");e.m=null});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){e.i(new T("ad-skipped"));e.i(new T("ad-stopped"))});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,function(f){var g=f.getStreamData();f=[];g=u(g.cuepoints);for(var h=g.next();!h.done;h=g.next())h=h.value,f.push({start:h.start,end:h.end});e.F=
f;e.i(new T("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}p=Ht.prototype;p.configure=function(){};p.stop=function(){this.D="";this.u=null;this.F=[]};p.release=function(){this.stop();this.h&&this.h.release()};p.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.g.onTimedMetadata(b)}};p.getCuePoints=function(){return this.F};
function It(a,b){a.i(new T("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.G)));b=b.getStreamData().url;a.j.resolve(b);a.j=null;a.H||a.h.o(a.l,"seeked",function(){var c=a.l.currentTime;if(c!=0){a.g.streamTimeForContentTime(c);var d=a.g.previousCuePointForStreamTime(c);d&&!d.played&&(a.u=c,a.l.currentTime=d.start)}})};function Y(){mb.call(this);this.h=this.i=this.j=this.g=null;this.m=new Js;this.u=navigator.language;this.l=null}ma(Y,mb);p=Y.prototype;p.setLocale=function(a){this.u=a};p.configure=function(a){this.l=a;this.g&&this.g.configure(this.l);this.j&&this.j.configure(this.l);this.h&&this.h.configure(this.l)};p.initInterstitial=function(a,b,c){var d=this;this.g&&this.g.release();this.g=new Ys(a,b,c,function(e){return Jt(d,e)});this.g.configure(this.l)};
p.initClientSide=function(a,b,c){var d=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new U(2,10,1E4);this.j&&this.j.release();this.j=new Qs(a,b,this.u,c,function(e){return Jt(d,e)});this.j.configure(this.l)};p.release=function(){this.g&&(this.g.release(),this.g=null);this.j&&(this.j.release(),this.j=null);this.i&&(this.i.release(),this.i=null);this.h&&(this.h.release(),this.h=null);mb.prototype.release.call(this)};
p.onAssetUnload=function(){this.g&&this.g.stop();this.j&&this.j.stop();this.i&&this.i.stop();this.h&&this.h.stop();this.dispatchEvent(new T("ad-stopped"));this.dispatchEvent(new T("ad-content-attach-requested"));this.m=new Js};p.requestClientSideAds=function(a){if(!this.j)throw new U(1,10,10001);var b=this.j;b.g&&b.g.destroy();b.m&&b.m.contentComplete();b.H=Date.now()/1E3;b.m.requestAds(a)};
p.updateClientSideAdsRenderingSettings=function(a){if(!this.j)throw new U(1,10,10001);var b=this.j;b.D=a;b.g&&b.g.updateAdsRenderingSettings(b.D)};p.initMediaTailor=function(a,b,c){var d=this;this.i&&this.i.release();this.i=new vt(a,b,c,function(e){return Jt(d,e)})};p.requestMediaTailorStream=function(a,b,c){if(!this.i)throw new U(1,10,10005);var d=this.i;c=c===void 0?"":c;d.l?a=Promise.reject(new U(1,10,10004)):(d.l=new Kg,yt(d,a,b),d.I=c||"",d.P=Date.now()/1E3,a=d.l);return a};
p.addMediaTailorTrackingUrl=function(a){if(!this.i)throw new U(1,10,10005);var b=this.i;b.H=a;b.i(new T("ads-loaded",(new Map).set("loadTime",0)))};p.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new U(2,10,10002);this.h&&this.h.release();this.h=new Ht(a,b,this.u,function(d){return Jt(c,d)});this.h.configure(this.l)};
p.requestServerSideStream=function(a,b){b=b===void 0?"":b;if(!this.h)throw new U(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&bb('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overridden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v4.16.6-1-gbdf61f7c8-dirty";c=this.h;c.j?a=Promise.reject(new U(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
(c.H=!0),c.j=new Kg,c.g.requestStream(a),c.D=b||"",c.G=Date.now()/1E3,a=c.j);return a};p.replaceServerSideAdTagParameters=function(a){if(!this.h)throw new U(1,10,10003);(a.mpt||a.mpv)&&bb('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overridden.');a.mpt="Shaka Player";a.mpv="v4.16.6-1-gbdf61f7c8-dirty";this.h.g.replaceAdTagParameters(a)};
p.getServerSideCuePoints=function(){bd("AdManager.getServerSideCuePoints","Please use getCuePoints function.");return this.getCuePoints()};p.getCuePoints=function(){var a=[];this.h&&(a=a.concat(this.h.getCuePoints()));this.i&&(a=a.concat(this.i.getCuePoints()));return a};p.getStats=function(){var a=this.m;return{loadTimes:a.g,averageLoadTime:Ks(a),started:a.h,overlayAds:a.j,playedCompletely:a.l,skipped:a.m,errors:a.i}};p.onManifestUpdated=function(a){if(this.i)this.i.onManifestUpdated(a)};
p.onDashTimedMetadata=function(a){this.h&&a.schemeIdUri=="urn:google:dai:2018"&&this.h.g.processMetadata(a.schemeIdUri,a.eventNode?a.eventNode.attributes.messageData:null,a.startTime)};p.onHlsTimedMetadata=function(a,b){this.h&&this.h.g.processMetadata("ID3",a.data,b)};p.onCueMetadataChange=function(a){if(this.h)this.h.onCueMetadataChange(a)};p.onHLSInterstitialMetadata=function(a,b,c){this.l&&this.l.disableHLSInterstitial||(this.g||this.initInterstitial(null,a,b),this.g&&kt(this.g,c))};
p.onDASHInterstitialMetadata=function(a,b,c){if(!this.l||!this.l.disableDASHInterstitial){var d=c.schemeIdUri;if(d=="urn:mpeg:dash:event:alternativeMPD:insert:2025"||d=="urn:mpeg:dash:event:alternativeMPD:replace:2025"){if(this.g||this.initInterstitial(null,a,b),this.g&&(a=this.g,b=c.schemeIdUri=="urn:mpeg:dash:event:alternativeMPD:replace:2025",d=c.schemeIdUri=="urn:mpeg:dash:event:alternativeMPD:insert:2025",b||d)){for(var e=c.startTime,f=c.endTime,g=null,h=0,k,l=u(c.eventNode.children),m=l.next();!m.done;m=
l.next())if(m=m.value,m.tagName=="AlternativeMPD"){if(m=m.attributes.uri){k=m;break}}else if(m.tagName=="InsertPresentation"||m.tagName=="ReplacePresentation"){var n=m.attributes.url;if(n){k=ec(n);(l=be(m,"maxDuration",he))&&(g=l/c.timescale);(l=be(m,"returnOffset",he))&&(h=l/c.timescale);b&&h&&(f=e+h);break}}k&&nt(a,[{id:c.id,groupId:null,startTime:e,endTime:f,uri:k,mimeType:null,isSkippable:!1,skipOffset:null,skipFor:null,canJump:!0,resumeOffset:d?h:null,playoutLimit:g,once:!1,pre:!1,post:!1,timelineRange:b&&
!d,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null,clickThroughUrl:null}])}}else(d=="urn:mpeg:dash:event:2012"||d=="urn:scte:dash:scte214-events")&&c.eventNode&&Zd(c.eventNode,"OverlayEvent")&&(this.g||this.initInterstitial(null,a,b),this.g&&ot(this.g,c))}};p.addCustomInterstitial=function(a){if(!this.g)throw new U(1,10,10006);nt(this.g,[a])};p.addAdUrlInterstitial=function(a){if(!this.g)throw new U(1,10,10006);return this.g.addAdUrlInterstitial(a)};
p.getInterstitialPlayer=function(){if(!this.g)throw new U(1,10,10006);return this.g.Yb()};function Jt(a,b){if(b&&b.type)switch(b.type){case "ads-loaded":a.m.g.push(b.loadTime);break;case "ad-started":a.m.h++;var c=b.ad;c&&!c.isLinear()&&a.m.j++;break;case "ad-complete":a.m.l++;break;case "ad-skipped":a.m.m++;break;case "ad-error":a.m.i++}a.dispatchEvent(b)}S("shaka.ads.AdManager",Y);Y.prototype.getInterstitialPlayer=Y.prototype.getInterstitialPlayer;Y.prototype.addAdUrlInterstitial=Y.prototype.addAdUrlInterstitial;
Y.prototype.addCustomInterstitial=Y.prototype.addCustomInterstitial;Y.prototype.onDASHInterstitialMetadata=Y.prototype.onDASHInterstitialMetadata;Y.prototype.onHLSInterstitialMetadata=Y.prototype.onHLSInterstitialMetadata;Y.prototype.onCueMetadataChange=Y.prototype.onCueMetadataChange;Y.prototype.onHlsTimedMetadata=Y.prototype.onHlsTimedMetadata;Y.prototype.onDashTimedMetadata=Y.prototype.onDashTimedMetadata;Y.prototype.onManifestUpdated=Y.prototype.onManifestUpdated;Y.prototype.getStats=Y.prototype.getStats;
Y.prototype.getCuePoints=Y.prototype.getCuePoints;Y.prototype.getServerSideCuePoints=Y.prototype.getServerSideCuePoints;Y.prototype.replaceServerSideAdTagParameters=Y.prototype.replaceServerSideAdTagParameters;Y.prototype.requestServerSideStream=Y.prototype.requestServerSideStream;Y.prototype.initServerSide=Y.prototype.initServerSide;Y.prototype.addMediaTailorTrackingUrl=Y.prototype.addMediaTailorTrackingUrl;Y.prototype.requestMediaTailorStream=Y.prototype.requestMediaTailorStream;
Y.prototype.initMediaTailor=Y.prototype.initMediaTailor;Y.prototype.updateClientSideAdsRenderingSettings=Y.prototype.updateClientSideAdsRenderingSettings;Y.prototype.requestClientSideAds=Y.prototype.requestClientSideAds;Y.prototype.onAssetUnload=Y.prototype.onAssetUnload;Y.prototype.release=Y.prototype.release;Y.prototype.initClientSide=Y.prototype.initClientSide;Y.prototype.initInterstitial=Y.prototype.initInterstitial;Y.prototype.configure=Y.prototype.configure;Y.prototype.setLocale=Y.prototype.setLocale;
Y.ADS_LOADED="ads-loaded";Y.AD_STARTED="ad-started";Y.AD_FIRST_QUARTILE="ad-first-quartile";Y.AD_MIDPOINT="ad-midpoint";Y.AD_THIRD_QUARTILE="ad-third-quartile";Y.AD_COMPLETE="ad-complete";Y.AD_STOPPED="ad-stopped";Y.AD_SKIPPED="ad-skipped";Y.AD_VOLUME_CHANGED="ad-volume-changed";Y.AD_MUTED="ad-muted";Y.AD_PAUSED="ad-paused";Y.AD_RESUMED="ad-resumed";Y.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";Y.CUEPOINTS_CHANGED="ad-cue-points-changed";Y.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded";
Y.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded";Y.AD_CLICKED="ad-clicked";Y.AD_PROGRESS="ad-progress";Y.AD_BUFFERING="ad-buffering";Y.AD_IMPRESSION="ad-impression";Y.AD_DURATION_CHANGED="ad-duration-changed";Y.AD_CLOSED="ad-closed";Y.AD_LOADED="ad-loaded";Y.ALL_ADS_COMPLETED="all-ads-completed";Y.AD_LINEAR_CHANGED="ad-linear-changed";Y.AD_METADATA="ad-metadata";Y.AD_RECOVERABLE_ERROR="ad-recoverable-error";Y.AD_ERROR="ad-error";Y.AD_BREAK_READY="ad-break-ready";Y.AD_INTERACTION="ad-interaction";
Y.AD_CONTENT_PAUSE_REQUESTED="ad-content-pause-requested";Y.AD_CONTENT_RESUME_REQUESTED="ad-content-resume-requested";Y.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested";fr=function(){return new Y};function Kt(a){return JSON.stringify(a,function(b,c){if(typeof c!="function"){if(c instanceof Event||c instanceof T){var d={};for(e in c)(b=c[e])&&typeof b=="object"?e=="detail"&&(d[e]=b):e in Event||(d[e]=b);return d}if(c instanceof Error){var e=new Set(["name","message","stack"]);for(d in c)e.add(d);d=u(Object.getOwnPropertyNames(c));for(b=d.next();!b.done;b=d.next())e.add(b.value);d={};e=u(e);for(b=e.next();!b.done;b=e.next())b=b.value,d[b]=c[b];c={__type__:"Error",contents:d}}else if(c instanceof
TimeRanges){e={__type__:"TimeRanges",length:c.length,start:[],end:[]};c=u(Tj(c));for(d=c.next();!d.done;d=c.next())d=d.value,b=d.end,e.start.push(d.start),e.end.push(b);c=e}else c=ArrayBuffer.isView(c)&&c.BYTES_PER_ELEMENT===1?{__type__:"Uint8Array",entries:Array.from(c)}:typeof c=="number"?isNaN(c)?"NaN":isFinite(c)?c:c<0?"-Infinity":"Infinity":c;return c}})}
function Lt(a){return JSON.parse(a,function(b,c){if(c=="NaN")var d=NaN;else if(c=="-Infinity")d=-Infinity;else if(c=="Infinity")d=Infinity;else if(c&&typeof c=="object"&&c.__type__=="TimeRanges")d=Mt(c);else if(c&&typeof c=="object"&&c.__type__=="Uint8Array")d=new Uint8Array(c.entries);else if(c&&typeof c=="object"&&c.__type__=="Error"){b=c.contents;c=Error(b.message);for(d in b)c[d]=b[d];d=c}else d=c;return d})}
function Mt(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}}
var Nt="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),Ot="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),Pt=["loop","playbackRate"],Qt=["pause","play"],Rt=(new Map).set("getAssetUri",2).set("getAudioLanguages",4).set("getAudioLanguagesAndRoles",4).set("getBufferFullness",1).set("getBufferedInfo",2).set("getExpiration",2).set("getKeyStatuses",2).set("getPlaybackRate",2).set("getTextLanguages",
4).set("getTextLanguagesAndRoles",4).set("isAudioOnly",10).set("isBuffering",1).set("isInProgress",1).set("isLive",10).set("isTextTrackVisible",1).set("isVideoOnly",10).set("keySystem",10).set("seekRange",1).set("getLoadMode",10).set("getManifestType",10).set("isFullyLoaded",1).set("isEnded",1).set("getBandwidthEstimate",1),St=(new Map).set("getConfiguration",4).set("getConfigurationForLowLatency",4).set("getStats",5).set("getAudioTracks",2).set("getChaptersTracks",2).set("getImageTracks",2).set("getVideoTracks",
2).set("getTextTracks",2).set("getVariantTracks",2),Tt=(new Map).set("getPlayheadTimeAsDate",1).set("getPresentationStartTimeAsDate",20).set("getSegmentAvailabilityDuration",20),Ut=[["getConfiguration","configure","getConfigurationForLowLatency","configurationForLowLatency"]],Vt=[["isTextTrackVisible","setTextTrackVisibility"]],Wt="cancelTrickPlay configure configurationForLowLatency getChapters resetConfiguration retryStreaming selectAudioLanguage selectAudioTrack selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel selectVideoTrack setTextTrackVisibility trickPlay updateStartTime goToLive useTrickPlayTrackIfAvailable".split(" "),
Xt="addChaptersTrack addTextTrackAsync addThumbnailsTrack getAllThumbnails getChaptersAsync getThumbnails attach attachCanvas detach load unload".split(" ");function Yt(a,b,c,d,e,f,g){var h=this;this.H=a;this.K=g;this.l=new Gf(b);this.L=c;this.A=!1;this.C=d;this.G=e;this.M=f;this.i=this.m=!1;this.J="";this.u=null;this.D=function(){return Zt(h)};this.F=function(k,l){k=Lt(l);switch(k.type){case "event":var m=k.targetName,n=Ya(k.event);h.C(m,n);break;case "update":m=k.update;for(n in m){k=h.g[n]||{};for(var q in m[n])k[q]=m[n][q]}h.A&&(h.L(),h.A=!1);break;case "asyncComplete":if(q=k.id,n=k.error,l=k.res,k=h.h.get(q),h.h.delete(q),k)if(n){q=new U(n.severity,
n.category,n.code);for(m in n)q[m]=n[m];k.reject(q)}else k.resolve(l)}};this.g={video:{},player:{}};this.I=0;this.h=new Map;this.j=null;$t.add(this)}p=Yt.prototype;p.destroy=function(){$t.delete(this);au(this);bu&&cu(this);this.l&&(this.l.stop(),this.l=null);this.G=this.C=null;this.i=this.m=!1;this.F=this.D=this.j=this.h=this.g=this.u=null;return Promise.resolve()};p.Qa=function(){return this.i};p.$f=function(){return this.J};
p.init=function(){if(this.H.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.l.Ka();var a=new chrome.cast.SessionRequest(this.H,[],null,this.K,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=u($t),d=c.next();!d.done;d=c.next()){d=d.value;var e=b;d.j=new Kg;d.A=!0;du(d,e)}},function(b){for(var c=u($t),d=c.next();!d.done;d=c.next())d=d.value,eu=b=="available",d.l.Ka()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});eu&&this.l.Y(fu);(a=bu)&&
a.status!=chrome.cast.SessionStatus.STOPPED?(this.j=new Kg,this.A=!0,du(this,a)):bu=null}else window.__onGCastApiAvailable!==gu&&(hu=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=gu)};p.bi=function(a){this.u=a;this.i&&iu(this,{type:"appData",appData:this.u})};
p.cast=function(){var a=this;return Q(function(b){if(!a.m)throw new U(1,8,8E3);if(!eu)throw new U(1,8,8001);if(a.i)throw new U(1,8,8002);a.j=new Kg;chrome.cast.requestSession(function(c){return du(a,c)},function(c){return ju(a,c)});return E(b,a.j,0)})};function ku(a){a.i&&chrome.cast.requestSession(function(b){return du(a,b)},function(b){return ju(a,b)})}p.Id=function(){if(this.i){au(this);if(bu){cu(this);try{bu.stop(function(){},function(){})}catch(a){}bu=null}Zt(this)}};
p.get=function(a,b){var c=this;if(a=="video"){if(Qt.includes(b))return function(){return c.Ej.apply(c,[a,b].concat(x(Na.apply(0,arguments))))}}else if(a=="player"){if(Tt.has(b)&&!this.get("player","isLive")())return function(){};if(Wt.includes(b))return function(){return c.Ej.apply(c,[a,b].concat(x(Na.apply(0,arguments))))};if(Xt.includes(b))return function(){return c.qm.apply(c,[a,b].concat(x(Na.apply(0,arguments))))};if(Rt.has(b)||St.has(b))return function(){return c.g[a][b]}}return this.g[a][b]};
p.set=function(a,b,c){this.g[a][b]=c;iu(this,{type:"set",targetName:a,property:b,value:c})};function du(a,b){var c=a.M();bu=b;b.addUpdateListener(a.D);b.addMessageListener("urn:x-cast:com.google.shaka.v2",a.F);Zt(a);iu(a,{type:"init",initState:c,appData:a.u});a.j.resolve()}function ju(a,b){var c=8003;switch(b.code){case "cancel":c=8004;break;case "timeout":c=8005;break;case "receiver_unavailable":c=8006}a.j.reject(new U(2,8,c,b))}
p.Ej=function(a,b){iu(this,{type:"call",targetName:a,methodName:b,args:Na.apply(2,arguments)})};p.qm=function(a,b){var c=Na.apply(2,arguments),d=new Kg,e=this.I.toString();this.I++;this.h.set(e,d);try{iu(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function cu(a){var b=bu;b.removeUpdateListener(a.D);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.F)}
function Zt(a){var b=bu?bu.status=="connected":!1;if(a.i&&!b){a.G();for(var c in a.g)a.g[c]={};au(a)}a.i=b;a.J=b?bu.receiver.friendlyName:"";a.l.Ka()}function au(a){if(a.h)for(var b=u(a.h.keys()),c=b.next();!c.done;c=b.next()){c=c.value;var d=a.h.get(c);a.h.delete(c);d.reject(new U(1,7,7E3))}}
function iu(a,b){b=Kt(b);var c=bu;try{c.sendMessage("urn:x-cast:com.google.shaka.v2",b,function(){},fb)}catch(d){throw b=new U(2,8,8005,d),c=new T("error",(new Map).set("detail",b)),a.C("player",c),a.Id(),b;}}var fu=.02,eu=!1,bu=null,hu=null,$t=new Set;function gu(a){hu?window.__onGCastApiAvailable=hu:delete window.__onGCastApiAvailable;hu=null;if(a)for(var b=u($t),c=b.next();!c.done;c=b.next())c.value.init();typeof window.__onGCastApiAvailable==="function"&&window.__onGCastApiAvailable(a)};function lu(a,b,c,d){d=d===void 0?!1:d;mb.call(this);var e=this;this.i=a;this.h=b;this.l=this.u=this.m=this.A=this.j=null;this.I=c;this.H=d;this.F=[];this.D=[];this.C=[];this.G=new Map;this.g=null;window.chrome?(this.g=new Yt(c,function(){return mu(e)},function(){return nu(e)},function(f,g){return ou(e,f,g)},function(){return pu(e)},function(){return qu(e)},d),ru(this)):(this.j=this.i,this.A=this.h)}ma(lu,mb);p=lu.prototype;
p.destroy=function(a){this.g&&(a===void 0?0:a)&&this.g.Id();this.l&&(this.l.release(),this.l=null);a=[];this.h&&(a.push(this.h.destroy()),this.h=null);this.g&&(a.push(this.g.destroy()),this.g=null);this.A=this.j=this.i=null;mb.prototype.release.call(this);return Promise.all(a)};p.Wc=function(){return this.j};p.Yb=function(){return this.A};p.Mg=function(){return this.g?this.g.m&&eu:!1};p.Qa=function(){return this.g?this.g.Qa():!1};p.$f=function(){return this.g?this.g.$f():""};
p.cast=function(){var a=this;return Q(function(b){return b.g==1?a.g?E(b,a.g.cast(),2):b.return():a.h?E(b,a.h.vc(),0):b.return()})};p.bi=function(a){this.g&&this.g.bi(a)};p.bk=function(){this.g&&ku(this.g)};p.Id=function(){this.g&&this.g.Id()};
p.Mi=function(a,b){b=b===void 0?!1:b;var c=this;return Q(function(d){if(d.g==1){if(a==c.I&&b==c.H)return d.return();c.I=a;c.H=b;if(!c.g)return d.return();c.g.Id();return E(d,c.g.destroy(),2)}c.g=null;c.g=new Yt(a,function(){return mu(c)},function(){return nu(c)},function(e,f){return ou(c,e,f)},function(){return pu(c)},function(){return qu(c)},b);c.g.init();H(d)})};
function ru(a){a.g.init();a.l=new Wc;for(var b=u(Nt),c=b.next();!c.done;c=b.next())a.l.o(a.i,c.value,function(f){a.g.Qa()||(f=Ya(f),a.m.dispatchEvent(f))});for(var d in Za)a.l.o(a.h,Za[d],function(f){a.g.Qa()||a.u.dispatchEvent(f)});a.j={};b={};for(var e in a.i)b={ye:b.ye},b.ye=e,Object.defineProperty(a.j,b.ye,{configurable:!1,enumerable:!0,get:function(f){return function(){return su(a,f.ye)}}(b),set:function(f){return function(g){var h=f.ye;a.g.Qa()?a.g.set("video",h,g):a.i[h]=g}}(b)});a.A={};tu(a,
function(f){Object.defineProperty(a.A,f,{configurable:!1,enumerable:!0,get:function(){return uu(a,f)}})});vu(a);a.m=new mb;a.m.Ze=a.j;a.u=new mb;a.u.Ze=a.A;a.l.o(a.h,"unloading",function(){a.g&&a.g.Qa()||wu(a)})}function vu(a){var b=new Map;tu(a,function(c,d){b.has(d)?(d=b.get(d),c.length<d.length?a.G.set(c,d):a.G.set(d,c)):b.set(d,c)})}
function tu(a,b){function c(k){return k=="constructor"||typeof d[k]!="function"?!1:!e.has(k)}var d=a.h,e=new Set,f;for(f in d)c(f)&&(e.add(f),b(f,d[f]));a=Object.getPrototypeOf(d);for(f=Object.getPrototypeOf({});a&&a!=f;){for(var g=u(Object.getOwnPropertyNames(a)),h=g.next();!h.done;h=g.next())h=h.value,c(h)&&(e.add(h),b(h,d[h]));a=Object.getPrototypeOf(a)}}
function qu(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.kd(),startTime:null,addThumbnailsTrackCalls:a.F,addTextTrackAsyncCalls:a.D,addChaptersTrackCalls:a.C};a.i.pause();for(var c=u(Pt),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.i[d];a.i.ended||(b.startTime=a.i.currentTime);c=u(Ut);for(d=c.next();!d.done;d=c.next()){var e=d.value;d=e[1];e=a.h[e[0]]();b.player[d]=e}c=u(Vt);for(d=c.next();!d.done;d=c.next())e=d.value,d=e[1],e=a.h[e[0]](),b.playerAfterLoad[d]=e;return b}
function mu(a){var b=new T("caststatuschanged");a.dispatchEvent(b)}function nu(a){var b=new T(a.j.paused?"pause":"play");a.m.dispatchEvent(b)}
function pu(a){for(var b=u(Ut),c=b.next();!c.done;c=b.next()){var d=c.value;c=d[1];d=a.g.get("player",d[0])();a.h[c](d)}var e=a.F,f=a.D,g=a.C;wu(a);var h=a.g.get("player","getAssetUri")();d=a.g.get("video","ended");b=Promise.resolve();var k=a.i.autoplay;c=null;d||(c=a.g.get("video","currentTime"));var l;(d=a.g.get("player","getTextTracks")())&&d.length&&(l=d.find(function(q){return q.active}));var m=a.g.get("player","isTextTrackVisible")();h&&(a.i.autoplay=!1,b=a.h.load(h,c));var n={};c=u(Pt);for(d=
c.next();!d.done;d=c.next())d=d.value,n[d]=a.g.get("video",d);b.then(function(){if(a.i){for(var q=u(e),r=q.next();!r.done;r=q.next()){r=r.value;var t;(t=a.Yb()).hf.apply(t,x(r))}q=u(f);for(t=q.next();!t.done;t=q.next()){t=t.value;var v;(v=a.Yb()).ie.apply(v,x(t))}v=u(g);for(q=v.next();!q.done;q=v.next()){q=q.value;var w;(w=a.Yb()).gf.apply(w,x(q))}w=u(Pt);for(v=w.next();!v.done;v=w.next())v=v.value,a.i[v]=n[v];w=u(Vt);for(v=w.next();!v.done;v=w.next())q=v.value,v=q[1],q=a.g.get("player",q[0])(),a.h[v](q);
a.h.$d(m);l&&a.h.ai(l.language,l.roles,l.forced);a.i.autoplay=k;h&&a.i.play()}},function(q){q=(new Map).set("detail",q);q=new T("error",q);a.h.dispatchEvent(q)})}
function su(a,b){if(b=="addEventListener")return function(d,e,f){return a.m.addEventListener(d,e,f)};if(b=="removeEventListener")return function(d,e,f){return a.m.removeEventListener(d,e,f)};if(a.g.Qa()&&Object.keys(a.g.g.video).length==0){var c=a.i[b];if(typeof c!="function")return c}return a.g.Qa()?a.g.get("video",b):(b=a.i[b],typeof b=="function"&&(b=b.bind(a.i)),b)}
function uu(a,b,c){c=c===void 0?!1:c;a.G.has(b)&&(b=a.G.get(b));if(b=="addEventListener")return function(d,e,f){return a.u.addEventListener(d,e,f)};if(b=="removeEventListener")return function(d,e,f){return a.u.removeEventListener(d,e,f)};if(b=="getMediaElement")return function(){return a.j};if(b=="getSharedConfiguration")return a.g.get("player","getConfiguration");if(b=="getNetworkingEngine")return function(){return a.h.Xb()};if(b=="getDrmEngine")return function(){return a.h.F};if(b=="getAdManager")return function(){return a.h.vf()};
if(b=="getQueueManager")return function(){return a.h.xf()};if(b=="setVideoContainer")return function(d){return a.h.ji(d)};if(!c){if(b=="addThumbnailsTrack")return function(){var d=Na.apply(0,arguments);a.F.push(d);return uu(a,b,!0).apply(null,x(d))};if(b=="addTextTrackAsync")return function(){var d=Na.apply(0,arguments);a.D.push(d);return uu(a,b,!0).apply(null,x(d))};if(b=="addChaptersTrack")return function(){var d=Na.apply(0,arguments);a.C.push(d);return uu(a,b,!0).apply(null,x(d))}}if(a.g.Qa()){if(b==
"getManifest"||b=="drmInfo")return function(){bb(b+"() does not work while casting!");return null};if(b=="attach"||b=="detach")return function(){bb(b+"() does not work while casting!");return Promise.resolve()};if(b=="getChapters")return function(){bb(b+"() does not work while casting!");return[]}}return a.g.Qa()&&Object.keys(a.g.g.video).length==0&&(Rt.has(b)||St.has(b))||!a.g.Qa()?a.h[b].bind(a.h):a.g.get("player",b)}
function ou(a,b,c){a.g.Qa()&&(b=="video"?a.m.dispatchEvent(c):b=="player"&&(c.type=="unloading"&&wu(a),a.u.dispatchEvent(c)))}function wu(a){a.F=[];a.D=[];a.C=[]}S("shaka.cast.CastProxy",lu);lu.prototype.changeReceiverId=lu.prototype.Mi;lu.prototype.forceDisconnect=lu.prototype.Id;lu.prototype.suggestDisconnect=lu.prototype.bk;lu.prototype.setAppData=lu.prototype.bi;lu.prototype.cast=lu.prototype.cast;lu.prototype.receiverName=lu.prototype.$f;lu.prototype.isCasting=lu.prototype.Qa;
lu.prototype.canCast=lu.prototype.Mg;lu.prototype.getPlayer=lu.prototype.Yb;lu.prototype.getVideo=lu.prototype.Wc;lu.prototype.destroy=lu.prototype.destroy;function xu(a,b,c,d){mb.call(this);var e=this;this.h=a;this.g=b;this.j=new Wc;this.I={video:a,player:b};this.G=c||function(){};this.J=d||function(f){return f};this.i=null;this.H=!1;this.u=!0;this.m=0;this.D=!1;this.C=!0;this.A=this.l=null;this.F=new Gf(function(){yu(e)});zu(this)}ma(xu,mb);p=xu.prototype;p.isConnected=function(){return this.H};p.Nl=function(){return this.u};p.Bm=function(a){this.i=a};p.Bk=function(){this.i=null};
p.Cm=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};p.Am=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};p.zm=function(a){this.i||(this.i={});this.i.artist=a;this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
p.destroy=function(){var a=this,b,c;return Q(function(d){if(d.g==1)return a.j&&(a.j.release(),a.j=null),b=[],a.g&&(b.push(a.g.destroy()),a.g=null),a.F&&(a.F.stop(),a.F=null),a.h=null,a.I=null,a.G=null,a.H=!1,a.u=!0,a.l=null,a.A=null,mb.prototype.release.call(a),E(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();H(d)})};
function zu(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return Au(a)};b.onSenderDisconnected=function(){return Au(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&Bu(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);Bu(a,{type:"event",targetName:"video",event:{type:"volumechange"}},a.l)};a.A=b.getCastMessageBus("urn:x-cast:com.google.cast.media");a.A.onMessage=function(e){return Cu(a,
e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return Du(a,e)};b.start();b=u(Nt);for(var c=b.next();!c.done;c=b.next())a.j.o(a.h,c.value,function(e){return Eu(a,"video",e)});for(var d in Za)a.j.o(a.g,Za[d],function(e){return Eu(a,"player",e)});a.j.o(a.h,"loadeddata",function(){a.D=!0});a.j.o(a.g,"loading",function(){a.u=!1;Fu(a)});a.j.o(a.h,"playing",function(){a.u=!1;Fu(a)});a.j.o(a.h,"pause",function(){Fu(a)});a.j.o(a.g,"unloading",function(){a.u=!0;Fu(a)});
a.j.o(a.h,"ended",function(){(new Gf(function(){a.h&&a.h.ended&&(a.u=!0,Fu(a))})).Y(Gu)})}function Au(a){a.m=0;a.C=!0;a.H=cast.receiver.CastReceiverManager.getInstance().getSenders().length!=0;Fu(a)}function Fu(a){var b;Q(function(c){if(c.g==1)return E(c,Promise.resolve(),2);if(!a.g)return c.return();b=new T("caststatuschanged");a.dispatchEvent(b);Hu(a)||Iu(a);H(c)})}
function Ju(a,b,c){var d,e,f,g,h,k,l,m,n,q,r,t,v,w,z,y,A,C,F;Q(function(D){switch(D.g){case 1:for(d in b.player)e=b.player[d],a.g[d](e);a.G(c);f=a.h.autoplay;return b.manifest?(a.h.autoplay=!1,sa(D,5),E(D,a.g.load(b.manifest,b.startTime),7)):E(D,Promise.resolve(),3);case 7:if(b.addThumbnailsTrackCalls)for(g=u(b.addThumbnailsTrackCalls),h=g.next();!h.done;h=g.next())k=h.value,a.g.hf.apply(a.g,x(k));if(b.addTextTrackAsyncCalls)for(l=u(b.addTextTrackAsyncCalls),m=l.next();!m.done;m=l.next())n=m.value,
a.g.ie.apply(a.g,x(n));if(b.addChaptersTrackCalls)for(q=u(b.addChaptersTrackCalls),r=q.next();!r.done;r=q.next())t=r.value,a.g.gf.apply(a.g,x(t));ua(D,3);break;case 5:return v=va(D),w=(new Map).set("detail",v),z=new T("error",w),a.g&&a.g.dispatchEvent(z),D.return();case 3:if(!a.g)return D.return();for(y in b.video)A=b.video[y],a.h[y]=A;for(C in b.playerAfterLoad)F=b.playerAfterLoad[C],a.g[C](F);a.h.autoplay=f;b.manifest&&(a.h.play(),Iu(a));H(D)}})}
function Eu(a,b,c){a.g&&(yu(a),Bu(a,{type:"event",targetName:b,event:c},a.l))}
function yu(a){a.F.Y(Ku);for(var b={video:{},player:{}},c=u(Ot),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.h[d];a.g.U()&&Tt.forEach(function(e,f){a.m%e==0&&(b.player[f]=a.g[f]())});Rt.forEach(function(e,f){a.m%e==0&&(b.player[f]=a.g[f]())});if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;Bu(a,{type:"update",update:b},a.l);St.forEach(function(e,f){a.m%e==0&&(e={player:{}},e.player[f]=a.g[f](),Bu(a,{type:"update",update:e},
a.l))});a.D&&(a.m+=1);Hu(a)}function Hu(a){return a.C&&(a.h.duration||a.g.U())?(Lu(a),a.C=!1,!0):!1}function Lu(a,b){var c={contentId:a.g.kd(),streamType:a.g.U()?"LIVE":"BUFFERED",contentType:""};a.g.U()||(c.duration=a.h.duration);a.i&&(c.metadata=a.i);Iu(a,b===void 0?0:b,c)}
function Du(a,b){var c=Lt(b.data);switch(c.type){case "init":a.m=0;a.D=!1;a.C=!0;Ju(a,c.initState,c.appData);yu(a);break;case "appData":a.G(c.appData);break;case "set":var d=c.targetName,e=c.property;c=c.value;if(d=="video")if(b=cast.receiver.CastReceiverManager.getInstance(),e=="volume"){b.setSystemVolumeLevel(c);break}else if(e=="muted"){b.setSystemVolumeMuted(c);break}a.I[d][e]=c;break;case "call":d=a.I[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=c.targetName;e=c.methodName;
d=="player"&&e=="load"&&(a.m=0,a.D=!1);var f=c.id,g=b.senderId;b=a.I[d];c=b[e].apply(b,c.args);d=="player"&&e=="load"&&(c=c.then(function(){a.C=!0}));c.then(function(h){return Mu(a,g,f,null,h)},function(h){return Mu(a,g,f,h,null)})}}
function Cu(a,b){var c=Lt(b.data);switch(c.type){case "PLAY":a.h.play();Iu(a);break;case "PAUSE":a.h.pause();Iu(a);break;case "SEEK":b=c.currentTime;var d=c.resumeState;b!=null&&(a.h.currentTime=Number(b));d&&d=="PLAYBACK_START"?(a.h.play(),Iu(a)):d&&d=="PLAYBACK_PAUSE"&&(a.h.pause(),Iu(a));break;case "STOP":a.g.vc().then(function(){a.g&&Iu(a)});break;case "GET_STATUS":Lu(a,Number(c.requestId));break;case "VOLUME":d=c.volume;b=d.level;d=d.muted;var e=a.h.volume,f=a.h.muted;b!=null&&(a.h.volume=Number(b));
d!=null&&(a.h.muted=d);e==a.h.volume&&f==a.h.muted||Iu(a);break;case "LOAD":a.m=0;a.D=!1;a.C=!1;b=c.media;d=c.currentTime;e=a.J(b.contentId);f=c.autoplay||!0;a.G(b.customData);f&&(a.h.autoplay=!0);a.g.load(e,d).then(function(){a.g&&Lu(a)}).catch(function(g){var h="LOAD_FAILED";g.category==7&&g.code==7E3&&(h="LOAD_CANCELLED");Bu(a,{requestId:Number(c.requestId),type:h},a.A)});break;default:Bu(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.A)}}
function Mu(a,b,c,d,e){a.g&&Bu(a,{type:"asyncComplete",id:c,error:d,res:e},a.l,b)}function Bu(a,b,c,d){a.H&&(a=Kt(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function Iu(a,b,c){c=c===void 0?null:c;var d={mediaSessionId:0,playbackRate:a.h.playbackRate,playerState:a.u?Nu:a.g.Ef()?Ou:a.h.paused?Pu:Qu,currentTime:a.h.currentTime,supportedMediaCommands:63,volume:{level:a.h.volume,muted:a.h.muted}};c&&(d.media=c);Bu(a,{requestId:b===void 0?0:b,type:"MEDIA_STATUS",status:[d]},a.A)}
S("shaka.cast.CastReceiver",xu);xu.prototype.destroy=xu.prototype.destroy;xu.prototype.setContentArtist=xu.prototype.zm;xu.prototype.setContentImage=xu.prototype.Am;xu.prototype.setContentTitle=xu.prototype.Cm;xu.prototype.clearContentMetadata=xu.prototype.Bk;xu.prototype.setContentMetadata=xu.prototype.Bm;xu.prototype.isIdle=xu.prototype.Nl;xu.prototype.isConnected=xu.prototype.isConnected;var Ku=.5,Gu=5,Nu="IDLE",Qu="PLAYING",Ou="BUFFERING",Pu="PAUSED";function Ru(a,b,c,d,e){if(d>=e)return null;for(var f=-1,g=-1,h=0;h<c.length;h++)if(c[h].some(function(C){return C!=null&&C.g.trim()!=""})){f=h;break}for(h=c.length-1;h>=0;h--)if(c[h].some(function(C){return C!=null&&C.g.trim()!=""})){g=h;break}if(f===-1||g===-1)return null;for(var k=h=!1,l="white",m="black",n=Su(d,e,h,k,l,m);f<=g;f++){for(var q=c[f],r=-1,t=-1,v=0;v<q.length;v++)if(q[v]!=null&&q[v].g.trim()!==""){r=v;break}for(v=q.length-1;v>=0;v--)if(q[v]!=null&&q[v].g.trim()!==""){t=v;break}if(r===
-1||t===-1)q=Tu(d,e),a.nestedCues.push(q);else{for(;r<=t;r++)if(v=q[r]){var w=v.l,z=v.i,y=v.j,A=v.h;if(w!=h||z!=k||y!=l||A!=m)n.payload&&a.nestedCues.push(n),n=Su(d,e,w,z,y,A),h=w,k=z,l=y,m=A;n.payload+=v.g}else n.payload+=" ";n.payload&&a.nestedCues.push(n);f!==g&&(n=Tu(d,e),a.nestedCues.push(n));n=Su(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}function Su(a,b,c,d,e,f){a=new ue(a,b,"");c&&a.textDecoration.push(Te);d&&(a.fontStyle=Se);a.color=e;a.backgroundColor=f;return a}
function Tu(a,b){a=new ue(a,b,"");a.lineBreak=!0;return a}function Uu(a,b,c,d,e){this.g=a;this.l=b;this.i=c;this.h=d;this.j=e};function Vu(a,b){this.i=[];this.g=1;this.h=0;this.F=a;this.D=b;this.j=this.m=!1;this.l="white";this.u="black";this.A=this.C=null;Wu(this)}function Xu(a,b,c){var d="CC"+((a.F<<1|a.D)+1),e=new ue(b,c,"");e.lineInterpretation=1;var f=Yu.get(a.g);f&&(e.line=f);a.A!=null&&a.C!=null&&(e.position=10+Math.min(70,a.A*10)+a.C*2.5);(b=Ru(e,d,a.i,b,c))&&a.g+b.cue.nestedCues.length-3>15&&(f=Yu.get(a.g+3-b.cue.nestedCues.length))&&(e.line=f);return b}function Wu(a){Zu(a,0,15);a.g=1}
function $u(a,b,c){if(!(c<32||c>127)){var d="";switch(b){case 0:d=av.has(c)?av.get(c):String.fromCharCode(c);break;case 1:d=bv.get(c);break;case 2:a.i[a.g].pop();d=cv.get(c);break;case 3:a.i[a.g].pop(),d=dv.get(c)}d&&a.i[a.g].push(new Uu(d,a.m,a.j,a.u,a.l))}}function ev(a,b,c,d){if(!(c<0||b<0))if(b>=c)for(--d;d>=0;d--)a.i[b+d]=a.i[c+d].map(function(f){return f});else for(var e=0;e<d;e++)a.i[b+e]=a.i[c+e].map(function(f){return f})}function Zu(a,b,c){for(var d=0;d<=c;d++)a.i[b+d]=[]}
var av=new Map([[39,"\u2019"],[42,"\u00e1"],[92,"\u00e9"],[92,"\u00e9"],[94,"\u00ed"],[95,"\u00f3"],[96,"\u00fa"],[123,"\u00e7"],[124,"\u00f7"],[125,"\u00d1"],[126,"\u00f1"],[127,"\u2588"]]),bv=new Map([[48,"\u00ae"],[49,"\u00b0"],[50,"\u00bd"],[51,"\u00bf"],[52,"\u2122"],[53,"\u00a2"],[54,"\u00a3"],[55,"\u266a"],[56,"\u00e0"],[57," "],[58,"\u00e8"],[59,"\u00e2"],[60,"\u00ea"],[61,"\u00ee"],[62,"\u00f4"],[63,"\u00fb"]]),cv=new Map([[32,"\u00c1"],[33,"\u00c9"],[34,"\u00d3"],[35,"\u00da"],[36,"\u00dc"],
[37,"\u00fc"],[38,"\u2018"],[39,"\u00a1"],[40,"*"],[41,"'"],[42,"\u2500"],[43,"\u00a9"],[44,"\u2120"],[45,"\u00b7"],[46,"\u201c"],[47,"\u201d"],[48,"\u00c0"],[49,"\u00c2"],[50,"\u00c7"],[51,"\u00c8"],[52,"\u00ca"],[53,"\u00cb"],[54,"\u00eb"],[55,"\u00ce"],[56,"\u00cf"],[57,"\u00ef"],[58,"\u00d4"],[59,"\u00d9"],[60,"\u00f9"],[61,"\u00db"],[62,"\u00ab"],[63,"\u00bb"]]),dv=new Map([[32,"\u00c3"],[33,"\u00e3"],[34,"\u00cd"],[35,"\u00cc"],[36,"\u00ec"],[37,"\u00d2"],[38,"\u00f2"],[39,"\u00d5"],[40,"\u00f5"],
[41,"{"],[42,"}"],[43,"\\"],[44,"^"],[45,"_"],[46,"|"],[47,"~"],[48,"\u00c4"],[49,"\u00e4"],[50,"\u00d6"],[51,"\u00f6"],[52,"\u00df"],[53,"\u00a5"],[54,"\u00a4"],[55,"\u2502"],[56,"\u00c5"],[57,"\u00e5"],[58,"\u00d8"],[59,"\u00f8"],[60,"\u250c"],[61,"\u2510"],[62,"\u2514"],[63,"\u2518"]]),Yu=new Map([[1,10],[2,15.33],[3,20.66],[4,26],[5,31.33],[6,36.66],[7,42],[8,47.33],[9,52.66],[10,58],[11,63.33],[12,68.66],[13,74],[14,79.33],[15,84.66]]);function fv(a,b){this.h=0;this.u=new Vu(a,b);this.i=new Vu(a,b);this.g=this.j=new Vu(a,b);this.l=0;this.m=null}function gv(a,b,c){a.g=a.i;var d=a.g,e=null;a.h!==3&&a.h!==4&&(e=Xu(d,a.l,c),c=a.i,c.g=c.h>0?c.h:0,Zu(c,0,15),c=a.j,c.g=c.h>0?c.h:0,Zu(c,0,15),d.g=15);a.h=3;d.h=b;return e}function hv(a){a.h=1;a.g=a.j;a.g.h=0}function iv(a){cb("Cea608DataChannel","CEA-608 text mode entered, but is unsupported");a.g=a.u;a.h=4}var jv="black green blue cyan red yellow magenta black".split(" "),kv="white green blue cyan red yellow magenta white_italics".split(" ");function lv(a,b){this.J=b;this.M=a;this.K=this.l=!1;this.m=this.u=this.H=this.L=this.I=0;this.G=2;this.i=[];this.g=this.h=this.j=0;this.F=this.C=!1;this.D="white";this.A="black";mv(this)}function mv(a){a.i=[];for(var b=0;b<16;b++)a.i.push(nv())}function nv(){for(var a=[],b=0;b<42;b++)a.push(null);return a}function ov(a,b){pv(a)&&(a.i[a.h][a.g]=new Uu(b,a.F,a.C,a.A,a.D),a.g++)}function pv(a){var b=a.g<a.m&&a.g>=0;return a.h<a.u&&a.h>=0&&b}lv.prototype.isVisible=function(){return this.l};
function qv(a){for(var b=0,c=1;c<16;c++,b++)a.i[b]=a.i[c];for(c=0;c<1;c++,b++)a.i[b]=nv()}
function rv(a,b,c){var d=new ue(a.j,b,"");d.textAlign=a.G===0?"left":a.G===1?"right":we;var e=d.region;a.J&&(e.id+="svc"+a.J);e.id+="win"+a.M;e.height=a.u;e.width=a.m;e.heightUnits=2;e.widthUnits=2;e.viewportAnchorX=a.I;e.viewportAnchorY=a.L;e.viewportAnchorUnits=a.K?yd:2;switch(a.H){case 0:e.regionAnchorX=0;e.regionAnchorY=0;break;case 1:e.regionAnchorX=50;e.regionAnchorY=0;break;case 2:e.regionAnchorX=100;e.regionAnchorY=0;break;case 3:e.regionAnchorX=0;e.regionAnchorY=50;break;case 4:e.regionAnchorX=
50;e.regionAnchorY=50;break;case 5:e.regionAnchorX=100;e.regionAnchorY=50;break;case 6:e.regionAnchorX=0;e.regionAnchorY=100;break;case 7:e.regionAnchorX=50;e.regionAnchorY=100;break;case 8:e.regionAnchorX=100,e.regionAnchorY=100}if(c=Ru(d,"svc"+c,a.i,a.j,b))a.j=b;return c}lv.prototype.display=function(){this.l=!0};function sv(){this.i=[];this.h=null;this.g=0}function tv(a,b){b.type===3?(a.g=(b.value&63)*2-1,a.h=[]):a.h&&(a.g>0&&(a.h.push(b),a.g--),a.g===0&&(a.i.push(new uv(a.h)),a.h=null,a.g=0))}function uv(a){this.g=0;this.h=a}uv.prototype.Pa=function(){return this.g<this.h.length};uv.prototype.Wa=function(){return this.g};function vv(a){if(!a.Pa())throw new U(2,2,3E3);return a.h[a.g++]}uv.prototype.skip=function(a){if(this.g+a>this.h.length)throw new U(2,2,3E3);this.g+=a};
uv.prototype.Jj=function(a){if(this.g-a<0)throw new U(2,2,3E3);this.g-=a};function wv(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null}
function xv(a,b,c,d){if(!a.g)return[];if(c==24)return c=vv(b).value,d=vv(b).value,c=function(f){return f.map(function(g){return("0"+(g&255).toString(16)).slice(-2)}).join("")}([c,d]),ov(a.g,String.fromCharCode(parseInt(c,16))),[];b=a.g;var e=null;switch(c){case 8:!pv(b)||b.g<=0&&b.h<=0||(b.g<=0?(b.g=b.m-1,b.h--):b.g--,b.i[b.h][b.g]=null);break;case 13:b.isVisible()&&(e=rv(b,d,a.i));b.h+1>=b.u?qv(b):b.h++;b.g=0;break;case 14:b.isVisible()&&(e=rv(b,d,a.i));b.i[b.h]=nv();b.g=0;break;case 12:b.isVisible()&&
(e=rv(b,d,a.i)),mv(b),b.h=0,b.g=0}return e?[e]:[]}
function yv(a,b,c,d){if(c>=128&&c<=135)d=c&7,a.h[d]&&(a.g=a.h[d]);else{if(c===136){c=vv(b).value;b=[];c=u(zv(a,c));for(var e=c.next();!e.done;e=c.next()){e=a.h[e.value];if(e.isVisible()){var f=rv(e,d,a.i);f&&b.push(f)}mv(e)}return b}if(c===137)for(b=vv(b).value,b=u(zv(a,b)),c=b.next();!c.done;c=b.next())c=a.h[c.value],c.isVisible()||(c.j=d),c.display();else{if(c===138){c=vv(b).value;b=null;c=u(zv(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=rv(e,d,a.i)),e.l=!1;return b?
[b]:[]}if(c===139){c=vv(b).value;b=null;c=u(zv(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()?b=rv(e,d,a.i):e.j=d,e.l=!e.l;return b?[b]:[]}if(c===140)return b=vv(b).value,Av(a,b,d);if(c===143)return d=Av(a,255,d),Bv(a),d;if(c===144)b.skip(1),d=vv(b).value,a.g&&(a.g.C=(d&128)>0,a.g.F=(d&64)>0);else if(c===145)d=vv(b).value,c=vv(b).value,b.skip(1),a.g&&(b=Cv((c&48)>>4,(c&12)>>2,c&3),a.g.D=Cv((d&48)>>4,(d&12)>>2,d&3),a.g.A=b);else if(c===146)d=vv(b).value,b=vv(b).value,a.g&&(a=
a.g,a.h=d&15,a.g=b&63);else if(c===151)b.skip(1),b.skip(1),d=vv(b).value,b.skip(1),a.g&&(a.g.G=d&3);else if(c>=152&&c<=159){c=(c&15)-8;e=a.h[c]!==null;e||(f=new lv(c,a.i),f.j=d,a.h[c]=f);d=vv(b).value;f=vv(b).value;var g=vv(b).value,h=vv(b).value,k=vv(b).value;b=vv(b).value;e&&(b&7)===0||(b=a.h[c],b.h=0,b.g=0,b.F=!1,b.C=!1,b.D="white",b.A="black");b=a.h[c];b.l=(d&32)>0;b.L=f&127;b.I=g;b.H=(h&240)>>4;b.K=(f&128)>0;b.u=(h&15)+1;b.m=(k&63)+1;a.g=a.h[c]}}}return[]}
function zv(a,b){for(var c=[],d=0;d<8;d++)(b&1)===1&&a.h[d]&&c.push(d),b>>=1;return c}function Av(a,b,c){var d=[];b=u(zv(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(f=rv(f,c,a.i))&&d.push(f);a.h[e]=null}return d}function Bv(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function Cv(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return Dv[a<<2|b<<1|c]}
var Ev=new Map([[32," "],[33,"\u00a0"],[37,"\u2026"],[42,"\u0160"],[44,"\u0152"],[48,"\u2588"],[49,"\u2018"],[50,"\u2019"],[51,"\u201c"],[52,"\u201d"],[53,"\u2022"],[57,"\u2122"],[58,"\u0161"],[60,"\u0153"],[61,"\u2120"],[63,"\u0178"],[118,"\u215b"],[119,"\u215c"],[120,"\u215d"],[121,"\u215e"],[122,"\u2502"],[123,"\u2510"],[124,"\u2514"],[125,"\u2500"],[126,"\u2518"],[127,"\u250c"]]),Dv="black blue green cyan red magenta yellow white".split(" ");function Fv(){this.h=[];this.g=[];this.i=new sv;this.l=0;this.m=new Map([["CC1",new fv(0,0)],["CC2",new fv(0,1)],["CC3",new fv(1,0)],["CC4",new fv(1,1)]]);this.A=this.u=0;this.j=new Map;this.D=!0;this.C=new Set;Gv(this)}Fv.prototype.clear=function(){this.l=0;this.h=[];this.g=[];var a=this.i;a.i=[];a.h=[];a.g=0;Gv(this);a=u(this.j.values());for(var b=a.next();!b.done;b=a.next())Bv(b.value)};
function Gv(a){a.u=0;a.A=0;for(var b=u(a.m.values()),c=b.next();!c.done;c=b.next())c=c.value,c.h=0,c.g=c.j,c.m=null,Wu(c.i),Wu(c.j),Wu(c.u);a.D=!0}
Fv.prototype.extract=function(a,b){if(this.D){for(var c=u(this.m.values()),d=c.next();!d.done;d=c.next())d.value.l=b;this.D=!1}a=new vh(a,0);if(!(a.getLength()<8)&&a.ba()===181&&a.Ia()===49&&a.$()===1195456820&&a.ba()===3&&(c=a.ba(),(c&64)!==0))for(c&=31,a.skip(1),d=0;d<c;d++){var e=a.ba(),f=(e&4)>>2,g=a.ba(),h=a.ba();f&&(e&=3,e===0||e===1?this.h.push({pts:b,type:e,Kb:g,xc:h,order:this.h.length}):(this.g.push({pts:b,type:e,value:g,order:this.g.length}),this.g.push({pts:b,type:2,value:h,order:this.g.length})))}};
Fv.prototype.decode=function(){function a(e,f){return e.pts-f.pts||e.order-f.order}var b=[];this.h.sort(a);this.g.sort(a);for(var c=u(this.h),d=c.next();!d.done;d=c.next())(d=Hv(this,d.value))&&b.push(d);c=u(this.g);for(d=c.next();!d.done;d=c.next())tv(this.i,d.value);c=u(this.i.i);for(d=c.next();!d.done;d=c.next())d=Iv(this,d.value),b.push.apply(b,x(d));this.i.i=[];this.h=[];this.g=[];return b};
function Hv(a,b){var c=b.type;if((b.Kb&112)===16){var d=b.Kb>>3&1;c===0?a.u=d:a.A=d}d="CC"+((c<<1|(c?a.A:a.u))+1);c=a.m.get(d);if(b.Kb===255&&b.xc===255||!b.Kb&&!b.xc||!Jv(b.Kb)||!Jv(b.xc))return++a.l>=45&&Gv(a),null;a.l=0;b.Kb&=127;b.xc&=127;var e=b.Kb;if(e>=1&&e<=15||!b.Kb&&!b.xc)return null;e=null;if((b.Kb&112)===16)a:{a.C.add(d),d=b.Kb;a=b.xc;if(c.m===(d<<8|a))c.m=null;else if(c.m=d<<8|a,(d&240)===16&&(a&192)===64){b=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(d&7)<<1|a>>5&1];d="white";e=!1;var f=
null;var g=a>95?a-96:a-64;g<=13?d=kv[Math.floor(g/2)]:g<=15?e=!0:f=Math.floor((g-16)/2);a=(a&1)===1;c.h!==4&&(g=c.g,c.h===3&&b!==g.g&&(c=1+b-g.h,ev(g,c,1+g.g-g.h,g.h),Zu(g,0,c-1),Zu(g,b+1,15-b)),g.g=b,g.m=a,g.j=e,g.l=d,g.A=f,g.u="black")}else if((d&247)===17&&(a&240)===32)c.g.m=!1,c.g.j=!1,c.g.l="white",$u(c.g,0,32),d=!1,b=kv[(a&14)>>1],b==="white_italics"&&(b="white",d=!0),c.g.m=(a&1)===1,c.g.j=d,c.g.l=b;else if((d&247)===16&&(a&240)===32||(d&247)===23&&(a&255)===45)b="black",(d&7)===0&&(b=jv[(a&
14)>>1]),c.g.u=b;else if((d&247)===17&&(a&240)===48)$u(c.g,1,a);else if((d&246)===18&&(a&224)===32)$u(c.g,d&1?3:2,a);else{if((d&246)===20&&(a&240)===32){a=b.pts;d=null;switch(b.xc){case 32:hv(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:d=gv(c,2,a);break;case 38:d=gv(c,3,a);break;case 39:d=gv(c,4,a);break;case 40:$u(c.g,0,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.l=a;break;case 42:Wu(c.u);iv(c);break;case 43:iv(c);break;case 44:b=c.i;d=null;c.h!==4&&(d=Xu(b,c.l,a));Zu(b,0,15);break;case 45:b=
c.g;c.h!==3?d=null:(d=Xu(b,c.l,a),e=b.g-b.h+1,ev(b,e-1,e,b.h),Zu(b,0,e-1),Zu(b,b.g,15-b.g),c.l=a);break;case 46:Zu(c.j,0,15);break;case 47:b=null,c.h!==4&&(b=Xu(c.i,c.l,a)),d=c.j,c.j=c.i,c.i=d,hv(c),c.l=a,d=b}e=d;break a}(d==23||d==31)&&a>=33&&a<=35&&(c.g.C=a-32)}e=null}else a=b.xc,$u(c.g,0,b.Kb),$u(c.g,0,a);return e}
function Iv(a,b){var c=[];try{for(;b.Pa();){var d=vv(b).value,e=(d&224)>>5,f=d&31;e===7&&f!=0&&(e=vv(b).value&63);if(e!=0){a.C.add("svc"+e);a.j.has(e)||a.j.set(e,new wv(e));for(var g=a.j.get(e),h=b.Wa();b.Wa()-h<f;){e=g;var k=b,l=vv(k),m=l.value,n=l.pts;if(m===16){var q=vv(k);m=m<<16|q.value}if(m>=0&&m<=31)var r=xv(e,k,m,n);else if(m>=128&&m<=159)r=yv(e,k,m,n);else{if(m>=4096&&m<=4127)e=k,k=m&255,k>=8&&k<=15?e.skip(1):k>=16&&k<=23?e.skip(2):k>=24&&k<=31&&e.skip(3);else if(m>=4224&&m<=4255)e=k,k=m&
255,k>=128&&k<=135?e.skip(4):k>=136&&k<=143&&e.skip(5);else if(m>=32&&m<=127)k=m,e.g&&(k===127?ov(e.g,"\u266a"):ov(e.g,String.fromCharCode(k)));else if(m>=160&&m<=255)e.g&&ov(e.g,String.fromCharCode(m));else if(m>=4128&&m<=4223){if(k=m&255,e.g)if(Ev.has(k)){var t=Ev.get(k);ov(e.g,t)}else ov(e.g,"_")}else m>=4256&&m<=4351&&e.g&&((m&255)!=160?ov(e.g,"_"):ov(e.g,"[CC]"));r=[]}c.push.apply(c,x(r))}}}}catch(v){if(v instanceof U&&v.code===3E3)cb("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");
else throw v;}return c}function Jv(a){for(var b=0;a;)b^=a&1,a>>=1;return b===1}Fv.prototype.getStreams=function(){return Array.from(this.C)};S("shaka.cea.CeaDecoder",Fv);ud=function(){return new Fv};function Kv(a){for(var b=[],c=a,d=a=0;d<c.length;)a==2&&c[d]==3?(a=0,c=[].concat(x(c)),c.splice(d,1),c=new Uint8Array(c)):c[d]==0?a++:a=0,d++;a=c;for(d=0;d<a.length;){for(c=0;a[d]==255;)c+=255,d++;c+=a[d++];for(var e=0;a[d]==255;)e+=255,d++;e+=a[d++];c==4&&b.push(a.subarray(d,d+e));d+=e}return b};function Lv(){this.j=new Map;this.i=this.h=0;this.g=Mv}
Lv.prototype.init=function(a){function b(f){f=f.name;Nv.has(f)&&(c.g=Nv.get(f))}var c=this,d=[],e=[];(new yh).box("moov",Dh).box("mvex",Dh).X("trex",function(f){var g=f.reader;g.skip(4);g.skip(4);f=g.$();g=g.$();c.h=f;c.i=g}).box("trak",Dh).X("tkhd",function(f){var g=f.reader;f=f.version;f==1?(g.skip(8),g.skip(8)):(g.skip(4),g.skip(4));var h=g.$();f==1?g.skip(8):g.skip(4);g.skip(4);g.skip(8);g.skip(2);g.skip(2);g.skip(2);g.skip(2);g.skip(36);g.Ia();g.Ia();g.Ia();g.Ia();d.push(h)}).box("mdia",Dh).X("mdhd",
function(f){f=Vi(f.reader,f.version);e.push(f.timescale)}).box("minf",Dh).box("stbl",Dh).X("stsd",Fh).box("avc1",b).box("avc3",b).box("dvav",b).box("dva1",b).box("hev1",b).box("hvc1",b).box("dvh1",b).box("dvhe",b).box("vvc1",b).box("vvi1",b).box("dvc1",b).box("dvi1",b).box("encv",Gh).box("sinf",Dh).box("frma",function(f){f=Yi(f.reader).codec;Nv.has(f)&&(c.g=Nv.get(f))}).parse(a,!0,!0);if(!d.length||!e.length||d.length!=e.length)throw new U(2,2,2010);this.g==Mv&&bb("Unable to determine bitstream format for CEA parsing!");
d.forEach(function(f,g){c.j.set(f,e[g])})};
Lv.prototype.parse=function(a){var b=this;if(this.g==Mv)return[];var c=[],d=0,e=[];(new yh).box("moof",function(f){d=f.start;e=[];Dh(f)}).box("traf",function(f){e.push({baseMediaDecodeTime:null,me:b.h,oe:b.i,xj:[],timescale:9E4});Dh(f)}).X("trun",function(f){var g=e[e.length-1];f=Wi(f.reader,f.version,f.flags);g.xj.push(f)}).X("tfhd",function(f){var g=e[e.length-1];f=Ti(f.reader,f.flags);g.me=f.me||b.h;g.oe=f.oe||b.i;f=f.trackId;b.j.has(f)&&(g.timescale=b.j.get(f))}).X("tfdt",function(f){var g=e[e.length-
1];f=Ui(f.reader,f.version);g.baseMediaDecodeTime=f.baseMediaDecodeTime}).box("mdat",function(f){for(var g=d-f.start-8,h=f.reader.Wa(),k=u(e),l=k.next();!l.done;l=k.next())l=l.value,l.baseMediaDecodeTime===null?bb("Unable to find base media decode time for CEA captions!"):(f.reader.seek(h),Ov(b,f.reader,l.baseMediaDecodeTime,l.timescale,l.me,l.oe,g,l.xj,c))}).parse(a,!1,!0);return c};
function Ov(a,b,c,d,e,f,g,h,k){var l=0,m=f,n=h.map(function(t){return t.Zh});n=[].concat.apply([],x(n));n.length&&(m=n[0].sampleSize||f);for(b.skip(g+h[0].Vg);b.Pa();){g=b.$();var q=b.ba(),r=null;r=!1;h=1;switch(a.g){case Pv:r=q&31;r=r==6;break;case Qv:h=2;b.skip(1);r=q>>1&63;r=r==39||r==40;break;case Rv:h=2;b.skip(1);r=q>>1&63;r=r==23||r==24;break;default:return}if(r)for(q=0,l<n.length&&(q=n[l].eg||0),q=(c+q)/d,h=b.cc(g-h,!1),h=u(Kv(h)),r=h.next();!r.done;r=h.next())k.push({packet:r.value,pts:q});
else try{b.skip(g-h)}catch(t){break}m-=g+4;m==0&&(c=l<n.length?c+(n[l].$h||e):c+e,l++,l<n.length?m=n[l].sampleSize||f:m=f)}}S("shaka.cea.Mp4CeaParser",Lv);var Mv=0,Pv=1,Qv=2,Rv=3,Nv=(new Map).set("avc1",Pv).set("avc3",Pv).set("dvav",Pv).set("dva1",Pv).set("hev1",Qv).set("hvc1",Qv).set("dvh1",Qv).set("dvhe",Qv).set("vvc1",Rv).set("vvi1",Rv).set("dvc1",Rv).set("dvi1",Rv);vd("video/mp4",function(){return new Lv});function Sv(){this.g=null}Sv.prototype.init=function(){};Sv.prototype.parse=function(a){this.g?this.g.clearData():this.g=new zk;var b=[];a=Lb(a);if(!Hk(a))return b;a=this.g.parse(a);var c=a.pe(),d=a.Af();a=[];switch(c.video){case "avc":a.push(6);break;case "hvc":a.push(39),a.push(40)}if(!a.length)return b;c=u(d);for(d=c.next();!d.done;d=c.next())if(d=d.value,a.includes(d.type)&&d.time!=null)for(var e=u(Kv(d.data)),f=e.next();!f.done;f=e.next())b.push({packet:f.value,pts:d.time});return b};
S("shaka.cea.TsCeaParser",Sv);vd("video/mp2t",function(){return new Sv});function Tv(a){var b=0,c=Pb(a),d=c.getUint32(b,!0);if(d!=a.byteLength)return[];a:{a=b+4+2;for(b=[];a<c.byteLength-1;){d=c.getUint16(a,!0);a+=2;var e=c.getUint16(a,!0);a+=2;if((e&1)!=0||e+a>c.byteLength){c=[];break a}var f=Lb(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function Uv(a){a=lc(Wd(a));a=Tv(a).filter(function(b){return b.type===Vv})[0];if(!a)return null;a=Zb(a.value,!0);return(a=Od(a,"WRMHEADER"))?a:null}
function Wv(a){try{var b=Uv(a);if(b)a:{for(var c=u(Yd(b,"DATA")),d=c.next();!d.done;d=c.next()){var e=d.value;if(e.children)for(var f=u(e.children),g=f.next();!g.done;g=f.next()){var h=g.value;if(h.tagName=="LA_URL"){var k=Wd(h);break a}}}k=""}else k="";return k}catch(l){return""}}var Vv=1;function Xv(){this.g=new Map}Xv.prototype.release=function(){this.g.clear()};
function Yv(a,b,c,d){var e=Zv(a,b),f=null;a=[];var g=[];b=null;var h=new Set(e.map(function(l){return l.keyId}));h.delete(null);var k="cenc";if(h.size>1)throw new U(2,4,4010);if(!c){g=e.filter(function(l){return l.Xd=="urn:mpeg:dash:sea:2012"});if(g.length>1)throw new U(2,4,4050);g.length&&(b=$v(g[0]));(g=e.find(function(l){return l.Xd=="urn:mpeg:dash:mp4protection:2011"}))&&g.encryptionScheme&&(k=g.encryptionScheme);g=e.filter(function(l){return l.Xd=="urn:mpeg:dash:mp4protection:2011"?(f=l.init||
f,!1):l.Xd!="urn:mpeg:dash:sea:2012"});g.length&&(a=aw(f,k,g,d,h),a.length==0&&(a=[qc("",k,f)]))}if(e.length&&!b&&(c||!g.length))for(a=[],c=u(Object.values(d)),d=c.next();!d.done;d=c.next())d=d.value,d!="org.w3.clearkey"&&a.push(qc(d,k,f));if(h=Array.from(h)[0]||null)for(k=u(a),c=k.next();!c.done;c=k.next())for(c=u(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=h;return{Qi:h,co:f,drmInfos:a,Jg:b,Vi:!0}}
function bw(a,b,c,d,e){var f=Yv(a,b,d,e);if(c.Vi){a=c.drmInfos.length==1&&!c.drmInfos[0].keySystem;b=f.drmInfos.length==0;if(c.drmInfos.length==0||a&&!b)c.drmInfos=f.drmInfos;c.Vi=!1}else if(f.drmInfos.length>0&&(c.drmInfos=c.drmInfos.filter(function(g){return f.drmInfos.some(function(h){return h.keySystem==g.keySystem})}),c.drmInfos.length==0))throw new U(2,4,4008);return f.Qi||c.Qi}
function cw(a){var b=$d(a.node,"https://dashif.org/CPS","Laurl");if(b&&(b=Wd(b)))return b;if((b=$d(a.node,"urn:microsoft:playready","pro"))&&Wd(b))return Wv(b);if(a=$d(a.node,"urn:mpeg:cenc:2013","pssh"))if(a=Wd(a)){b=lc(a);a=8;b=Pb(b);var c=b.getUint8(a);a+=20;c>0&&(a+=4+16*b.getUint32(a));a=Lb(b,a+4);a=hc(a);a=Od("<pro>"+a+"</pro>");return Wv(a)}return""}
function aw(a,b,c,d,e){var f=[];c=u(c);for(var g=c.next();!g.done;g=c.next()){g=g.value;var h=d[g.Xd];if(h){var k;if((k=$d(g.node,"urn:microsoft:playready","pro"))&&Wd(k)){k=Wd(k);k=lc(k);var l=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);k=[{initData:Kh(k,l,new Set,0),initDataType:"cenc",keyId:g.keyId}]}else k=null;l=null;if(g.Xd==="urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"){l=g;var m=e;if(m.size==0)l=null;else{var n=new Uint8Array([16,119,239,236,192,178,77,2,
172,227,60,30,82,226,251,75]),q=new Uint8Array([]);l=[{initData:Kh(q,n,m,1),initDataType:"cenc",keyId:l.keyId}]}}k=qc(h,b,g.init||a||k||l);if(h=dw.get(h))k.licenseServerUri=h(g);a:{if(g=$d(g.node,"https://dashif.org/CPS","Certurl"))if(g=Wd(g))break a;g=""}k.serverCertificateUri=g;f.push(k)}}return f}function Zv(a,b){var c=[];b=u(b);for(var d=b.next();!d.done;d=b.next())(d=ew(a,d.value))&&c.push(d);return c}
function ew(a,b){var c=b.attributes.schemeIdUri,d=ce(b,"urn:mpeg:cenc:2013","default_KID"),e=ae(b,"urn:mpeg:cenc:2013","pssh").map(Xd),f=b.attributes.value;if(!c)return null;c=c.toLowerCase();if(d&&(d=d.replace(/-/g,"").toLowerCase(),d.includes(" ")))throw new U(2,4,4009);var g=[];try{g=e.map(function(h){if(!a.g.has(h)){var k=lc(h);a.g.set(h,k)}return{initDataType:"cenc",initData:a.g.get(h),keyId:null}})}catch(h){throw new U(2,4,4007);}return{node:b,Xd:c,keyId:d,init:g.length>0?g:null,encryptionScheme:f}}
function $v(a){if(!window.crypto||!window.crypto.subtle)throw bb("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new U(2,4,4042);var b=$d(a.node,"urn:mpeg:dash:schema:sea:2012","SegmentEncryption");if(!b)throw new U(2,4,4051);if(b.attributes.schemeIdUri!="urn:mpeg:dash:sea:aes128-cbc:2013")throw new U(2,4,4051);b=$d(a.node,"urn:mpeg:dash:schema:sea:2012","CryptoPeriod");if(!b)throw new U(2,4,4051);a=b.attributes.IV;b=ec(b.attributes.keyUriTemplate);
if(!a||!b)throw new U(2,4,4051);a=mc(a.substr(2));if(a.byteLength!=16)throw new U(2,4,4048);return{Tl:b,iv:a}}
var dw=(new Map).set("com.apple.fps",function(a){if("apple"===window.shakaMediaKeysPolyfill)throw new U(2,4,4054);if(a=$d(a.node,"https://dashif.org/CPS","Laurl"))if(a=Wd(a))return a;return""}).set("com.widevine.alpha",function(a){var b=$d(a.node,"https://dashif.org/CPS","Laurl");return b&&(b=Wd(b))?b:(a=$d(a.node,"urn:microsoft","laurl"))?ec(a.attributes.licenseUrl)||"":""}).set("com.microsoft.playready",cw).set("com.microsoft.playready.recommendation",cw).set("com.microsoft.playready.software",
cw).set("com.microsoft.playready.hardware",cw).set("org.w3.clearkey",function(a){var b=$d(a.node,"https://dashif.org/CPS","Laurl");return b&&(b=Wd(b))?b:(a=$d(a.node,"http://dashif.org/guidelines/clearKey","Laurl"))&&a.attributes.Lic_type==="EME-1.0"&&a&&(a=Wd(a))?a:""});function fw(a,b,c,d,e,f){var g=(new Map).set("RepresentationID",b).set("Number",c).set("SubNumber",d).set("Bandwidth",e).set("Time",f);return a.replace(/\$(RepresentationID|Number|SubNumber|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,function(h,k,l,m){if(h=="$$")return"$";var n=g.get(k);if(n==null)return h;k=="RepresentationID"&&l&&(l=void 0);k=="Time"&&typeof n!="bigint"&&(Math.abs(n-Math.round(n))>=.2&&bb("Calculated $Time$ values must be close to integers"),n=Math.round(n));switch(m){case void 0:case "d":case "i":case "u":h=
n.toString();break;case "o":h=n.toString(8);break;case "x":h=n.toString(16);break;case "X":h=n.toString(16).toUpperCase();break;default:h=n.toString()}l=window.parseInt(l,10)||1;return Array(Math.max(0,l-h.length)+1).join("0")+h})}
function gw(a,b){var c=hw(a,b,"timescale"),d=1;c&&(d=ie(c)||1);c=hw(a,b,"duration");var e=(c=ie(c||""))?c/d:null,f=hw(a,b,"startNumber"),g=Number(hw(a,b,"presentationTimeOffset"))||0,h=je(f||"");if(f==null||h==null)h=1;f=null;if(b=iw(a,b,"SegmentTimeline")){b=Vd(b,"S");f=d;a=a.qa.duration||Infinity;for(var k=h,l=[],m=-g,n=0;n<b.length;++n){var q=b[n],r=b[n+1],t=be(q,"t",je),v=be(q,"d",je),w=be(q,"r",he);q=be(q,"k",he)||0;t!=null&&(t-=g);if(v){t=t!=null?t:m;w=w||0;if(w<0)if(r){r=be(r,"t",je);if(r==
null)break;else if(t>=r)break;w=Math.ceil((r-t)/v)-1}else{if(a==Infinity)break;else if(t/f>=a)break;w=Math.ceil((a*f-t)/v)-1}l.length>0&&t!=m&&(l[l.length-1].end=t/f);for(r=0;r<=w;++r)m=t+v,l.push({start:t/f,end:m/f,xi:t,Hc:q,xm:l.length+k}),t=m}}f=l}return{timescale:d,rg:c,qb:e,Le:h,Rb:g/d||0,xd:g,timeline:f}}function jw(a,b){return[b(a.N),b(a.va),b(a.Aa)].filter(Jf)}function hw(a,b,c){b=jw(a,b);a=null;b=u(b);for(var d=b.next();!d.done&&!(a=d.value.attributes[c]);d=b.next());return a}
function iw(a,b,c){b=jw(a,b);a=null;b=u(b);for(var d=b.next();!d.done&&!(a=Zd(d.value,c));d=b.next());return a}
function kw(a,b,c,d,e,f){for(var g=ce(a,"http://www.w3.org/1999/xlink","href"),h=ce(a,"http://www.w3.org/1999/xlink","actuate")||"onRequest",k=u(Object.keys(a.attributes)),l=k.next();!l.done;l=k.next()){l=l.value;var m=l.split(":"),n=Qd("http://www.w3.org/1999/xlink");m[0]==n&&delete a.attributes[l]}if(f>=5)return Xg(new U(2,4,4028));if(h!="onLoad")return Xg(new U(2,4,4027));var q=pc([d],[g]);return e.request(0,jh(q,b)).bb(function(r){r=Nd(r.data,a.tagName);if(!r)return Xg(new U(2,4,4001,g));for(a.children=
[];r.children.length;){var t=r.children.shift();a.children.push(t)}t=u(Object.keys(r.attributes));for(var v=t.next();!v.done;v=t.next())v=v.value,a.attributes[v]=r.attributes[v];return lw(a,b,c,q[0],e,f+1)})}
function lw(a,b,c,d,e,f){f=f===void 0?0:f;if(ce(a,"http://www.w3.org/1999/xlink","href")){var g=kw(a,b,c,d,e,f);c&&(g=g.bb(void 0,function(){return lw(a,b,c,d,e,f)}));return g}g=[];for(var h=u(Ud(a)),k=h.next(),l={};!k.done;l={je:void 0},k=h.next())l.je=k.value,ce(l.je,"http://www.w3.org/1999/xlink","href")=="urn:mpeg:dash:resolve-to-zero:2013"?a.children=a.children.filter(function(m){return function(n){return n!==m.je}}(l)):l.je.tagName!="SegmentTimeline"&&g.push(lw(l.je,b,c,d,e,f));return ah(g).bb(function(){return a})}
;function mw(a,b,c,d,e,f,g){var h,k=(new yh).X("sidx",function(l){h=nw(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new U(2,3,3004);}
function nw(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.$();if(k==0)throw new U(2,3,3005);if(g.version==0){var l=g.reader.$();var m=g.reader.$()}else l=g.reader.Ud(),m=g.reader.Ud();g.reader.skip(2);var n=g.reader.Ia();a=a+g.size+m;for(m=0;m<n;m++){var q=g.reader.$(),r=(q&2147483648)>>>31;q&=2147483647;var t=g.reader.$();g.reader.skip(4);if(r==1)throw new U(2,3,3006);h.push(new Jj(l/k+c,(l+t)/k+c,function(){return f},a,a+q-1,b,c,d,e));l+=t;a+=q}g.parser.stop();return h};function ow(a){this.h=Pb(a);this.g=new vh(this.h,0)}ow.prototype.Pa=function(){return this.g.Pa()};
function pw(a){var b=qw(a);if(b.length>7)throw new U(2,3,3002);var c=0;b=u(b);for(var d=b.next();!d.done;d=b.next())c=256*c+d.value;b=qw(a);a:{d=u(rw);for(var e=d.next();!e.done;e=d.next())if(Kb(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.Wa();else{if(b.length==8&&b[1]&224)throw new U(2,3,3001);for(e=d=0;e<b.length;e++){var f=b[e];d=e==0?f&(1<<8-b.length)-1:256*d+f}b=d}b=a.g.Wa()+b<=a.h.byteLength?b:a.h.byteLength-a.g.Wa();d=Pb(a.h,a.g.Wa(),b);a.g.skip(b);return new sw(c,
d)}function qw(a){var b=a.g.Wa(),c=a.g.ba();if(c==0)throw new U(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return Lb(a.h,b,c)}var rw=[[255],[127,255],[63,255,255],[31,255,255,255],[15,255,255,255,255],[7,255,255,255,255,255],[3,255,255,255,255,255,255],[1,255,255,255,255,255,255,255]];function sw(a,b){this.id=a;this.g=b}
function tw(a){if(a.g.byteLength>8)throw new U(2,3,3002);if(a.g.byteLength==8&&a.g.getUint8(0)&224)throw new U(2,3,3001);for(var b=0,c=0;c<a.g.byteLength;c++){var d=a.g.getUint8(c);b=256*b+d}return b};function uw(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new ow(a.g);for(var n=null,q=null;a.Pa();){var r=pw(a);if(r.id==187){var t=vw(r);t&&(r=c*t.Lm,t=b+t.om,n!=null&&m.push(new Jj(n+g,r+g,l,q,t-1,f,g,h,k)),n=r,q=t)}}n!=null&&m.push(new Jj(n+g,d+g,l,q,null,f,g,h,k));return m}
function vw(a){var b=new ow(a.g);a=pw(b);if(a.id!=179)throw new U(2,3,3013);a=tw(a);b=pw(b);if(b.id!=183)throw new U(2,3,3012);b=new ow(b.g);for(var c=0;b.Pa();){var d=pw(b);if(d.id==241){c=tw(d);break}}return{Lm:a,om:c}};function ww(a,b,c){b=iw(a,b,"Initialization");if(!b)return null;var d=a.N.mb(),e=b.attributes.sourceURL;e&&(d=pc(d,[ec(e)],a.Tb()));e=0;var f=null;if(b=be(b,"range",ge))e=b.start,f=b.end;c=new Hj(function(){return d},e,f,xw(a),null,null,c,a.va.encrypted);c.codecs=a.N.codecs;c.mimeType=a.N.mimeType;a.qa&&!a.qa.Ff&&(c.g=a.qa.start+a.qa.duration);return c}
function yw(a,b,c){var d=Number(hw(a,zw,"presentationTimeOffset"))||0,e=hw(a,zw,"timescale"),f=1;e&&(f=ie(e)||1);var g=d/f||0,h=ww(a,zw,c);Aw(a,h);var k=Ld(a);return{endTime:-1,timeline:-1,jd:function(){var l=iw(k,zw,"RepresentationIndex");var m=k.N.mb();l&&(l=ec(l.attributes.sourceURL))&&(m=pc(m,[l],k.Tb()));l=Bw(k);return Cw(k,b,h,m,l.start,l.end,g)},timescale:f}}
function Cw(a,b,c,d,e,f,g){var h,k,l,m,n,q,r,t,v,w,z,y,A,C,F,D,B,G;return Q(function(K){if(K.g==1)return h=a.presentationTimeline,k=!a.Mb||!a.qa.Ff,l=a.qa.start,m=a.qa.duration,n=a.N.mimeType.split("/")[1],q=b,r=null,t=[q(d,e,f,!1),n=="webm"?q(c.S(),c.startByte,c.endByte,!0):null],q=null,E(K,Promise.all(t),2);v=K.h;w=v[0];z=v[1]||null;y=null;A=l-g;C=l;F=m?l+m:Infinity;if(n=="mp4")var I=mw(w,e,d,c,A,C,F);else{I=w;var J=new ow(z);if(pw(J).id!=440786851)throw new U(2,3,3008);var L=pw(J);if(L.id!=408125543)throw new U(2,
3,3009);J=L.g.byteOffset;L=new ow(L.g);for(var N=null;L.Pa();){var P=pw(L);if(P.id==357149030){N=P;break}}if(!N)throw new U(2,3,3010);N=new ow(N.g);P=1E6;for(L=null;N.Pa();){var O=pw(N);if(O.id==2807729)P=tw(O);else if(O.id==17545)if(O.g.byteLength==4)L=O.g.getFloat32(0);else if(O.g.byteLength==8)L=O.g.getFloat64(0);else throw new U(2,3,3003);}if(L==null)throw new U(2,3,3011);N=P/1E9;L*=N;I=pw(new ow(I));if(I.id!=475249515)throw new U(2,3,3007);I=uw(I,J,N,L,d,c,A,C,F)}y=I;D=u(y);for(B=D.next();!B.done;B=
D.next())G=B.value,G.codecs=a.N.codecs,G.mimeType=a.N.mimeType,G.bandwidth=a.bandwidth;h.De(y);r=new mm(y);k&&r.Hd(C,F,!0);return K.return(r)})}function zw(a){return a.Yd}function Bw(a){var b=iw(a,zw,"RepresentationIndex");a=hw(a,zw,"indexRange");a=ge(a||"");b&&(a=be(b,"range",ge,a));return a}function Aw(a,b){Dw(a,b);if(!Bw(a))throw new U(2,4,4002);}
function Dw(a,b){var c=a.N.mimeType.split("/")[1];if(a.N.contentType!=vc&&c!="mp4"&&c!="webm")throw new U(2,4,4006);if(c=="webm"&&!b)throw new U(2,4,4005);}
function xw(a){var b=a.N;return{bandwidth:a.bandwidth,audioSamplingRate:b.audioSamplingRate,codecs:b.codecs,contentType:b.contentType,frameRate:b.frameRate||null,height:b.height||null,mimeType:b.mimeType,channelsCount:b.Tf,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null,label:a.va.label||null,roles:a.roles||null,language:a.va.language||null}};function Ew(a,b,c){var d=ww(a,Fw,c),e=Gw(a);if(!e.qb&&!e.timeline&&e.Qd.length>1)throw new U(2,4,4002);if(!e.qb&&!a.qa.duration&&!e.timeline&&e.Qd.length==1)throw new U(2,4,4002);if(e.timeline&&e.timeline.length==0)throw new U(2,4,4002);var f=null,g=null;a.Aa.id&&a.N.id&&(g=b.get(a.Aa.id+","+a.N.id))&&(f=g.segmentIndex);var h=Hw(a.qa.start,a.qa.duration,a.N.mb,e,d,c,a.N.mimeType,a.N.codecs,a.bandwidth,a.Tb);b=!f;f?f.Be(h,a.presentationTimeline.Pb()):f=new mm(h);a.presentationTimeline.De(h);a.Mb&&
a.qa.Ff||f.Hd(a.qa.start,a.qa.duration?a.qa.start+a.qa.duration:Infinity,b);g&&(g.segmentIndex=f);return{endTime:-1,timeline:-1,jd:function(){f&&f.getNumReferences()!=0||f.Of(h);return Promise.resolve(f)},timescale:e.timescale}}function Fw(a){return a.Lc}function Gw(a){var b=Iw(a);a=gw(a,Fw);var c=a.Le;c==0&&(c=1);var d=0;a.qb?d=a.qb*(c-1):a.timeline&&a.timeline.length>0&&(d=a.timeline[0].start);return{qb:a.qb,startTime:d,Le:c,Rb:a.Rb,timescale:a.timescale,timeline:a.timeline,Qd:b}}
function Hw(a,b,c,d,e,f,g,h,k,l){var m=d.Qd.length;d.timeline&&d.timeline.length!=d.Qd.length&&(m=Math.min(d.timeline.length,d.Qd.length));for(var n=a-d.Rb,q=b?a+b:Infinity,r=[],t=d.startTime,v={},w=0;w<m;v={ug:void 0,fg:void 0},w++){v.fg=d.Qd[w];var z=t;t=void 0;t=d.qb!=null?z+d.qb:d.timeline?d.timeline[w].end:z+b;v.ug=null;v=new Jj(a+z,a+t,function(y){return function(){y.ug==null&&(y.ug=pc(c(),[y.fg.$l],l()));return y.ug}}(v),v.fg.start,v.fg.end,e,n,a,q,[],"",null,null,Kj,f);v.codecs=h;v.mimeType=
g;v.bandwidth=k;r.push(v)}return r}function Iw(a){return[a.N.Lc,a.va.Lc,a.Aa.Lc].filter(Jf).map(function(b){return Vd(b,"SegmentURL")}).reduce(function(b,c){return b.length>0?b:c}).map(function(b){b.attributes.indexRange&&!a.Dh&&(a.Dh=!0);var c=ec(b.attributes.media);b=be(b,"mediaRange",ge,{start:0,end:null});return{$l:c,start:b.start,end:b.end}})};function Jw(a,b,c,d,e,f,g,h,k,l){k||a.N.Cf||(a.N.Cf=hw(a,Kw,"initialization"));var m=a.N.Cf?Lw(a,g):null,n=Mw(a);Nw(n);var q=Ld(a);if(n.we)return Dw(a,m),{endTime:-1,timeline:-1,jd:function(){var z=fw(n.we,q.N.originalId,null,null,q.bandwidth||null,null);z=pc(q.N.mb(),[z]);return Cw(q,b,m,z,0,null,n.Rb)},timescale:n.timescale};if(n.qb)return d||a.va.contentType==="image"||a.va.contentType==="text"||(d=a.qa.start,l=a.Aa.id,c=a.qa.duration,l=(l=l!=null&&f.get(l)||c)?d+l:Infinity,a.presentationTimeline.Lh(n.qb),
a.presentationTimeline.vj(d,l)),{endTime:-1,timeline:-1,jd:function(){return Ow(q,n,e,m,f,g,h,a.N.gg)},timescale:n.timescale};var r=null;d=d=null;a.Aa.id&&a.N.id&&(d=a.Aa.id+","+a.N.id,d=c.get(d))&&(r=d.segmentIndex);var t=a.qa.start,v=a.qa.duration?t+a.qa.duration:Infinity;if(r)l=r,Pw(l,n,t,v,m,a.Mb),l.cb(a.presentationTimeline.Pb());else{c=0;k=-1;if(a.Aa.id!=null&&a.N.id!=null){var w=l.get(a.Aa.id);if(w)k=w.timeline;else for(l=u(l.values()),w=l.next();!w.done;w=l.next())if(w=w.value,Math.abs(n.Rb-
w.endTime)<=yc&&w.Uh.includes(a.N.id)){k=w.timeline;break}else w.timeline>=c&&(c=w.timeline+1)}k==-1&&(k=c);r=new Qw(a.Mb,n,a.N.originalId,a.bandwidth,a.N.mb,a.Tb,t,v,m,g,a.N.gg,k)}n.timeline&&a.va.contentType!=="image"&&a.va.contentType!=="text"&&a.presentationTimeline.wj(r.h?r.h.timeline:[],t);d&&a.Mb&&(d.segmentIndex=r);d=(d=(d=n.timeline)&&d[d.length-1])?d.end+n.Rb:-1;l=-1;r instanceof Qw&&(l=r.qf());return{endTime:d,timeline:l,jd:function(){r instanceof Qw&&r.getNumReferences()==0&&Pw(r,n,t,
v,m,a.Mb);return Promise.resolve(r)},timescale:n.timescale}}function Kw(a){return a.bd}function Mw(a){var b=gw(a,Kw),c=hw(a,Kw,"media"),d=hw(a,Kw,"index"),e=hw(a,Kw,"k"),f=0;e&&(f=parseInt(e,10));return{rg:b.rg,qb:b.qb,timescale:b.timescale,Le:b.Le,Rb:b.Rb,xd:b.xd,timeline:b.timeline,lc:c&&ec(c),we:d,mimeType:a.N.mimeType,codecs:a.N.codecs,bandwidth:a.bandwidth,am:f}}
function Nw(a){var b=a.we?1:0;b+=a.timeline?1:0;b+=a.qb?1:0;if(b==0)throw new U(2,4,4002);b!=1&&(a.we&&(a.timeline=null),a.rg=null,a.qb=null);if(!a.we&&!a.lc)throw new U(2,4,4002);}
function Ow(a,b,c,d,e,f,g,h){function k(L){var N=L-w,P=N*v,O=b.rg,M=N*O;"BigInt"in window&&M>Number.MAX_SAFE_INTEGER&&(M=BigInt(N)*BigInt(O));P+=q;N=P+v;O=Math.min(N,m());var R=[],V=b.am;if(V)for(var xa=(O-P)/V,ba={},Oa=0;Oa<V;ba={Zj:void 0},Oa++){var Ha=P+xa*Oa,Ia=Ha+xa;ba.Zj=Oa;ba=new Jj(Ha,Ia,function(Fa){return function(){var wa=fw(z,A,L,Fa.Zj,y,M);return pc(C(),[wa],F())}}(ba),0,null,d,D,q,m(),[],"",null,null,Kj,f);ba.codecs=a.N.codecs;ba.mimeType=a.N.mimeType;h==0?Oa>0&&ba.Od():Oa%h!=0&&ba.Od();
R.push(ba)}P=new Jj(P,O,function(){if(V)return[];var Fa=fw(z,A,L,null,y,M);return pc(C(),[Fa],F())},0,null,d,D,q,m(),R,"",null,null,Kj,f,R.length>0);P.codecs=a.N.codecs;P.mimeType=a.N.mimeType;P.bandwidth=a.bandwidth;P.j=N;return P}function l(){var L=[Math.max(n.Pb(),q),Math.min(n.Tc(),m())].map(function(N){return N-q});L=[Math.ceil(L[0]/v),Math.ceil(L[1]/v)-1];a.N.Cb&&L[1]++;return L.map(function(N){return N+w})}function m(){var L=r!=null&&e.get(r)||t;return L?q+L:Infinity}var n=a.presentationTimeline,
q=a.qa.start,r=a.Aa.id,t=a.qa.duration,v=b.qb,w=b.Le,z=b.lc,y=a.bandwidth||null,A=a.N.originalId,C=a.N.mb,F=a.Tb,D=q-b.Rb,B=l();c=a.Mb?Math.max(B[0],B[1]-c+1):B[0];g=g||B[1];B=[];for(var G=c;G<=g;++G){var K=k(G);B.push(K)}var I=new mm(B);B=n.Tc()<m();G=n.U();if(B||G){var J=Math.max(c,g+1);c=v;a.N.Cb&&(c=.1);I.sg(c,function(){var L=n.Pb();I.cb(L);var N=u(l());N.next();N=N.next().value;for(var P=[];J<=N;){var O=k(J);P.push(O);J++}return L>m()&&!P.length?null:P})}return Promise.resolve(I)}
function Lw(a,b){var c=a.N.Cf;c||(c=hw(a,Kw,"initialization"));if(!c)return null;c=ec(c);var d=a.N.originalId,e=a.bandwidth||null,f=a.N.mb,g=a.Tb;b=new Hj(function(){var h=fw(c,d,null,null,e,null);return pc(f(),[h],g())},0,null,xw(a),null,null,b,a.va.encrypted);b.codecs=a.N.codecs;b.mimeType=a.N.mimeType;a.qa&&!a.qa.Ff&&(b.g=a.qa.start+a.qa.duration);return b}
function Qw(a,b,c,d,e,f,g,h,k,l,m,n){mm.call(this,[]);this.F=a;this.h=b;this.H=c;this.D=d;this.G=e;this.J=f;this.j=g;this.l=h;this.A=k;this.C=l;this.I=m;this.K=n;Rw(this)}ma(Qw,mm);p=Qw.prototype;p.getNumReferences=function(){return this.h?this.h.timeline.length:0};p.release=function(){mm.prototype.release.call(this);this.h=null};
p.cb=function(a){if(this.h){for(var b=0,c=this.h.timeline,d=0;d<c.length;d+=1)if(c[d].end+this.j<=a)b+=1;else break;b>0&&(this.h.timeline=c.slice(b),this.g.length>=b&&(this.g=this.g.slice(b)),this.i+=b,this.getNumReferences()===0&&this.release())}};
function Pw(a,b,c,d,e,f){Sw(a,e);a.F=f;if(a.h){a.h.xd!==b.xd&&(a.h.timeline=b.timeline,a.h.xd=b.xd,a.h.Rb=b.Rb);a.h.lc!==b.lc&&(a.h.lc=b.lc);c=a.h.timeline;if(c.length){var g=c[c.length-1];b=b.timeline.filter(function(h){return h.end>g.end})}else b=b.timeline.slice();b.length>0&&a.h.timeline.push.apply(a.h.timeline,x(b));a.l!==d&&(a.l=d)}else a.h=b,a.j=c,a.l=d;Rw(a)}function Sw(a,b){if(a.A!==b){a.A=b;a=u(a.g);for(var c=a.next();!c.done;c=a.next())(c=c.value)&&Nj(c,b)}}
function Rw(a){if(a.h&&!a.u){for(var b=[],c=u(a.h.timeline),d=c.next();!d.done;d=c.next())d=d.value,d.start>=a.l||d.end<=0||b.push(d);a.h.timeline=b;a.cb(a.j)}}
p.find=function(a){if(this.h&&this.h.timeline&&this.h.timeline.length&&a<this.h.timeline[0].start+this.j)return this.i;if(!this.h)return null;var b=this.h.timeline;if(a<this.j||a>=this.l)return null;for(var c=b.length-1,d=0;d<b.length;d++){var e=b[d],f=e.start+this.j;e=d<c?b[d+1].start+this.j:this.l===Infinity?e.end+this.j:this.l;if(a>=f&&a<e)return d+this.i}return null};
p.get=function(a){var b=this;a-=this.i;if(a<0||a>=this.getNumReferences()||!this.h)return null;var c=this.g[a];if(!c){c=this.h.timeline[a];var d=c.xm,e=c.xi+this.h.xd,f=this.j-this.h.Rb,g=this.j+c.end,h=g;a===this.getNumReferences()-1&&this.l!==Infinity&&(h=this.F&&Math.abs(h-this.l)>.1?Math.min(h,this.l):this.l);var k=this.h.codecs,l=this.h.mimeType,m=this.h.bandwidth,n=[],q=!1;c.Hc&&this.h&&this.h.lc&&(q=this.h.lc.includes("$SubNumber$"));if(q){q=(c.end-c.start)/c.Hc;for(var r={},t=0;t<c.Hc;r={vg:void 0,
$j:void 0},t++){var v=c.start+q*t,w=v+q;r.$j=t;r.vg=null;r=new Jj(this.j+v,this.j+w,function(z){return function(){if(!b.h)return[];z.vg==null&&(z.vg=Tw(b.h.lc,b.H,d,b.D,e,z.$j,b.G,b.J));return z.vg}}(r),0,null,this.A,f,this.j,this.l,[],"",null,null,Kj,this.C);r.codecs=k;r.mimeType=l;r.bandwidth=m;this.I==0?t>0&&r.Od():t%this.I!=0&&r.Od();n.push(r)}}c=new Jj(this.j+c.start,h,function(){return n.length>0||!b.h?[]:Tw(b.h.lc,b.H,d,b.D,e,null,b.G,b.J)},0,null,this.A,f,this.j,this.l,n,"",null,null,Kj,this.C,
n.length>0);c.codecs=k;c.mimeType=l;c.j=g;c.bandwidth=m;this.g[a]=c}return c};p.Nb=function(a){Rw(this);for(var b=0;b<this.getNumReferences();b++){var c=this.get(b+this.i);c&&a(c)}};function Tw(a,b,c,d,e,f,g,h){a=fw(a,b,c,f,d||null,e);return pc(g(),[a],h()).map(function(k){return k.toString()})}p.qf=function(){return this.K};function Uw(a){this.u=null;this.C=a;this.H=new ch;this.i=[];this.h=null;this.m=[];this.D=null;this.G=[];this.F=300;this.l=new Map;this.j=new Map;this.g=null;this.A="UNKNOWN"}Uw.prototype.configure=function(a){this.u=a};Uw.prototype.destroy=function(){this.C=this.u=null;this.i=[];this.h=null;this.m=[];this.G=[];this.l.clear();this.g!=null&&(this.g.stop(),this.g=null);return this.H.destroy()};Uw.prototype.setManifestType=function(a){this.A=a};
function Vw(a,b){var c,d,e,f,g,h,k;return Q(function(l){if(l.g==1)return c=pc(a.i,[Ww(a,b)]),d=jh(c,a.u.retryParameters),e=a.C.networkingEngine.request(8,d),dh(a.H,e),sa(l,2),E(l,e.promise,4);if(l.g!=2)return f=l.h,g=Yb(f.data),h=JSON.parse(g),h.VERSION==1&&Xw(a,h,f.uri),ua(l,0);if((k=va(l))&&k.code==7001)return l.return();a.g!=null&&(a.g.stop(),a.g=null);a.g=new Gf(function(){Vw(a,b)});a.g.Y(a.F);H(l)})}
function Ww(a,b){if(!a.m.length)return b;b=new tb(b);var c=a.D||a.m[0],d=Math.round(a.C.getBandwidthEstimate()),e=b.g;a.A=="DASH"?(e.add("_DASH_pathway",c),e.add("_DASH_throughput",String(d))):a.A=="HLS"&&(e.add("_HLS_pathway",c),e.add("_HLS_throughput",String(d)));Ib(e)&&xb(b,e);return b.toString()}function Xw(a,b,c){a.g!=null&&(a.g.stop(),a.g=null);var d=b["RELOAD-URI"]||c;a.g=new Gf(function(){Vw(a,d)});if(c=b.TTL)a.F=c;a.g.Y(a.F);a.m=b["PATHWAY-PRIORITY"]||[];a.G=b["PATHWAY-CLONES"]||[]}
function Yw(a,b,c,d){var e=a.l.get(b);e||(e=new Map);e.set(c,d);a.l.set(b,e)}Uw.prototype.banLocation=function(a){this.j.set(a,Date.now()+6E4)};
function Zw(a,b,c){c=c===void 0?!1:c;b=a.l.get(b)||new Map;for(var d=[],e=u(a.m),f=e.next(),g={};!f.done;g={Sd:void 0},f=e.next())if(g.Sd=f.value,f=b.get(g.Sd))d.push({Qh:g.Sd,location:f});else if(f=a.G.find(function(k){return function(l){return l.ln==k.Sd}}(g))){var h=b.get(f["BASE-ID"]);h&&(f["URI-REPLACEMENT"].qk?(h=new tb(h),vb(h,f["URI-REPLACEMENT"].qk),d.push({Qh:g.Sd,location:h.toString()})):d.push({Qh:g.Sd,location:h}))}e=Date.now();g=u(a.j.keys());for(f=g.next();!f.done;f=g.next())f=f.value,
h=a.j.get(f),e>h&&a.j.delete(f);d=d.filter(function(k){for(var l=u(a.j.keys()),m=l.next();!m.done;m=l.next())if(m.value.includes((new tb(k.location)).Lb))return!1;return!0});d.length&&(a.D=d[0].Qh);d=d.map(function(k){return k.location});if(!d.length&&a.h)for(e=u(a.h.split(",")),g=e.next();!g.done;g=e.next())if(g=b.get(g.value))a.D=a.h,d.push(g);if(!d.length)for(b=u(b.values()),e=b.next();!e.done;e=b.next())d.push(e.value);return c?d:pc(a.i,d)};function $w(){this.l=[];this.h=[];this.g=[];this.j=[];this.i=[];this.u=!1;this.m=new Set}p=$w.prototype;p.release=function(){for(var a=u(this.h.concat(this.g,this.j,this.i)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.h=[];this.g=[];this.j=[];this.i=[];this.l=[];this.u=!1;this.m.clear()};p.El=function(){return this.l};p.xh=function(){return this.j.slice()};p.Vk=function(){return this.i};
p.Ri=function(a,b){if(a){if(a.type=="audio")for(var c=u(this.h),d=c.next();!d.done;d=c.next())d=d.value,d.matchedStreams=d.matchedStreams.filter(function(e){return e!==a});else if(a.type=="video")for(c=u(this.g),d=c.next();!d.done;d=c.next())d=d.value,d.matchedStreams=d.matchedStreams.filter(function(e){return e!==a}),d.trickModeVideo&&(d.trickModeVideo.matchedStreams=d.trickModeVideo.matchedStreams.filter(function(e){return e!==a})),d.dependencyStream&&(d.dependencyStream.matchedStreams=d.dependencyStream.matchedStreams.filter(function(e){return e!==
a}));else if(a.type==vc)for(c=u(this.j),d=c.next();!d.done;d=c.next())d=d.value,d.matchedStreams=d.matchedStreams.filter(function(e){return e!==a});else if(a.type=="image")for(c=u(this.i),d=c.next();!d.done;d=c.next())d=d.value,d.matchedStreams=d.matchedStreams.filter(function(e){return e!==a});a.segmentIndex&&a.closeSegmentIndex();this.m.delete(b)}};
function ax(a,b){var c=[],d=[],e=[],f=[];a=u(a);for(var g=a.next();!g.done;g=a.next()){var h=g.value;g=new Map(h.audioStreams.map(function(n){return[bx(n),n]}));var k=new Map(h.videoStreams.map(function(n){return[cx(n),n]})),l=new Map(h.textStreams.map(function(n){return[dx(n),n]}));h=new Map(h.imageStreams.map(function(n){return[ex(n),n]}));if(b){var m=fx(vc);l.set(dx(m),m);m=fx("image");h.set(ex(m),m)}c.push(g);d.push(k);e.push(l);f.push(h)}return{Hi:c,lk:d,fk:e,gj:f}}
p.Qg=function(a,b,c){c=c===void 0?!1:c;var d=this,e,f,g,h,k,l,m,n,q,r,t,v,w,z,y,A,C,F,D,B,G,K,I,J,L,N,P,O,M,R,V,xa;return Q(function(ba){if(ba.g==1){e=xc;if(!b&&a.length==1)return f=ax(a,!1),g=f.Hi,h=f.lk,k=f.fk,l=f.gj,d.h=Array.from(g[0].values()),d.g=Array.from(h[0].values()),d.j=Array.from(k[0].values()),d.i=Array.from(l[0].values()),ba.B(2);m=c?d.m.size:0;n=-1;for(q=0;q<a.length;q++)r=a[q],d.m.has(r.id)||(d.m.add(r.id),n==-1&&(n=q));if(n==-1)return ba.return();t=ax(a,!0);v=t.Hi;w=t.lk;z=t.fk;
y=t.gj;return E(ba,Promise.all([gx(d,d.h,v,n,hx,ix,m),gx(d,d.g,w,n,hx,ix,m),gx(d,d.j,z,n,hx,ix,m),gx(d,d.i,y,n,hx,ix,m)]),2)}A=0;C=[];if(d.g.length&&d.h.length)for(J=u(d.h),L=J.next();!L.done;L=J.next())for(N=L.value,P=u(d.g),O=P.next();!O.done;O=P.next())M=O.value,R=Dg(N.drmInfos,M.drmInfos),N.drmInfos.length&&M.drmInfos.length&&!R.length||(V=(N.bandwidth||0)+(M.bandwidth||0),N.dependencyStream&&(V+=N.dependencyStream.bandwidth||0),M.dependencyStream&&(V+=M.dependencyStream.bandwidth||0),xa=A++,
C.push({id:xa,language:N.language,disabledUntilTime:0,primary:N.primary,audio:N,video:M,bandwidth:V,drmInfos:R,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(F=d.g.length?d.g:d.h,D=u(F),B=D.next();!B.done;B=D.next())G=B.value,K=A++,I=G.bandwidth||0,G.dependencyStream&&(I+=G.dependencyStream.bandwidth||0),C.push({id:K,language:G.language,disabledUntilTime:0,primary:G.primary,audio:G.type==e.na?G:null,video:G.type==e.Ha?G:null,bandwidth:I,drmInfos:G.drmInfos,allowedByApplication:!0,
allowedByKeySystem:!0,decodingInfos:[]});d.l=C;H(ba)})};
function jx(a){var b,c,d,e,f,g,h,k,l,m,n,q,r,t,v,w,z,y,A,C,F,D,B,G,K,I,J,L,N,P;return Q(function(O){switch(O.g){case 1:b=xc;if(a.length==1)return O.return(a[0]);c=a.map(function(M){return new Map(M.filter(function(R){return R.type===b.na}).map(function(R){return[bx(R),R]}))});d=a.map(function(M){return new Map(M.filter(function(R){return R.type===b.Ha}).map(function(R){return[cx(R),R]}))});e=a.map(function(M){return new Map(M.filter(function(R){return R.type===b.Va}).map(function(R){return[dx(R),
R]}))});f=a.map(function(M){return new Map(M.filter(function(R){return R.type===b.Ag}).map(function(R){return[ex(R),R]}))});g=u(e);for(h=g.next();!h.done;h=g.next())k=h.value,l=kx(b.Va),k.set(dx(l),l);m=u(f);for(n=m.next();!n.done;n=m.next())q=n.value,r=kx(b.Ag),q.set(ex(r),r);t=new $w;return E(O,gx(t,[],c,0,lx,mx,0),2);case 2:return v=O.h,E(O,gx(t,[],d,0,lx,mx,0),3);case 3:return w=O.h,E(O,gx(t,[],e,0,lx,mx,0),4);case 4:return z=O.h,E(O,gx(t,[],f,0,lx,mx,0),5);case 5:y=O.h;A=0;if(w.length&&v.length)for(G=
u(v),K=G.next();!K.done;K=G.next())for(I=K.value,J=u(w),L=J.next();!L.done;L=J.next())N=L.value,P=A++,N.variantIds.push(P),I.variantIds.push(P);else for(C=w.concat(v),F=u(C),D=F.next();!D.done;D=F.next())B=D.value,B.variantIds=[A++];return O.return(w.concat(v).concat(z).concat(y))}})}
function gx(a,b,c,d,e,f,g){var h,k,l,m,n,q,r,t,v,w,z,y,A,C,F,D,B,G,K,I;return Q(function(J){switch(J.g){case 1:h=[];for(k=0;k<c.length;k++)k>=d?h.push(new Set(c[k].values())):h.push(new Set);l=u(b);m=l.next();case 2:if(m.done){J.B(4);break}n=m.value;return E(J,nx(a,n,c,d,f,h,g),5);case 5:q=J.h;if(!q)throw new U(2,4,4037);m=l.next();J.B(2);break;case 4:r=u(h);for(t=r.next();!t.done;t=r.next())for(v=t.value,w=u(v),z=w.next();!z.done;z=w.next())y=z.value,(A=ox(a,b,y,c,e,f,h))&&b.push(A);C=u(h);for(F=
C.next();!F.done;F=C.next())for(D=F.value,B=u(D),G=B.next(),K={};!G.done;K={li:void 0},G=B.next())if(K.li=G.value,!px(K.li)&&(I=b.some(function(L){return function(N){return qx(L.li,N)}}(K))))throw new U(2,4,4037);return J.return(b)}})}function nx(a,b,c,d,e,f,g){return Q(function(h){if(h.g==1)return rx(a,c,b,g>0),b.matchedStreams?b.segmentIndex?E(h,sx(b,d+g),2):h.B(2):h.return(!1);tx(b,d,e,f,g);return h.return(!0)})}
function sx(a,b){var c,d,e,f,g,h;return Q(function(k){if(k.g==1){c=[];d=a.matchedStreams;for(e=b;e<d.length;e++)f=d[e],c.push(f.createSegmentIndex()),f.trickModeVideo&&!f.trickModeVideo.segmentIndex&&c.push(f.trickModeVideo.createSegmentIndex()),f.dependencyStream&&!f.dependencyStream.segmentIndex&&c.push(f.dependencyStream.createSegmentIndex());return E(k,Promise.all(c),2)}if(a.segmentIndex instanceof pm)for(g=b;g<d.length;g++)h=d[g],h.segmentIndex&&a.segmentIndex.h.push(h.segmentIndex);H(k)})}
function ox(a,b,c,d,e,f,g){if(px(c))return null;var h=e(c);rx(a,d,h);h.createSegmentIndex&&(h.createSegmentIndex=function(){return Q(function(k){if(h.segmentIndex)return k.B(0);h.segmentIndex=new pm;return E(k,sx(h,0),0)})},h.closeSegmentIndex=function(){h.segmentIndex&&(h.segmentIndex.release(),h.segmentIndex=null);if(h.matchedStreams)for(var k=u(h.matchedStreams),l=k.next();!l.done;l=k.next()){l=l.value;var m;if(m=l.segmentIndex){a:{m=u(b);for(var n=m.next();!n.done;n=m.next())if(n=n.value,n!==
h&&n.segmentIndex&&n.matchedStreams&&n.matchedStreams.includes(l)){m=!0;break a}m=!1}m=!m}m&&(l.segmentIndex.release(),l.segmentIndex=null)}});if(!h.matchedStreams||!h.matchedStreams.length)return null;tx(h,0,f,g,0);return h}
function tx(a,b,c,d,e){var f=a.matchedStreams;for(b+=e;b<f.length;b++){var g=f[b];c(a,g);var h=!0;a.type=="audio"&&Ic(a.language,g.language)==0&&(h=!1);if(h&&((h=d[b-e])&&h.delete(g),g.fullMimeTypes))for(g=u(g.fullMimeTypes.values()),h=g.next();!h.done;h=g.next())a.fullMimeTypes.add(h.value)}}
function hx(a){var b=Object.assign({},a);b.originalId=null;b.createSegmentIndex=function(){return Promise.resolve()};b.closeSegmentIndex=function(){};b.roles=b.roles.slice();b.segmentIndex=null;b.emsgSchemeIdUris=[];b.keyIds=new Set(a.keyIds);b.closedCaptions=a.closedCaptions?new Map(a.closedCaptions):null;b.trickModeVideo=null;b.dependencyStream=null;return b}
function lx(a){var b=Object.assign({},a);b.roles=b.roles.slice();b.keyIds=new Set(a.keyIds);b.segments=[];b.variantIds=[];b.closedCaptions=a.closedCaptions?new Map(a.closedCaptions):null;return b}
function ix(a,b){function c(g,h){g||(g=[]);h=u(h);for(var k=h.next();!k.done;k=h.next())k=k.value,g.includes(k)||g.push(k);return g}a.roles=c(a.roles,b.roles);b.emsgSchemeIdUris&&(a.emsgSchemeIdUris=c(a.emsgSchemeIdUris,b.emsgSchemeIdUris));for(var d=u(b.keyIds),e=d.next();!e.done;e=d.next())a.keyIds.add(e.value);a.originalId==null?a.originalId=b.originalId:(d=b.originalId||"")&&!a.originalId.endsWith(d)&&(a.originalId+=","+d);d=Dg(a.drmInfos,b.drmInfos);if(b.drmInfos.length&&a.drmInfos.length&&!d.length)throw new U(2,
4,4038);a.drmInfos=d;a.encrypted=a.encrypted||b.encrypted;if(b.closedCaptions)for(a.closedCaptions||(a.closedCaptions=new Map),d=u(b.closedCaptions),e=d.next();!e.done;e=d.next()){var f=u(e.value);e=f.next().value;f=f.next().value;a.closedCaptions.set(e,f)}a.bandwidth&&b.bandwidth&&(a.bandwidth=Math.max(a.bandwidth,b.bandwidth));b.trickModeVideo?(a.trickModeVideo||(a.trickModeVideo=hx(b.trickModeVideo),a.trickModeVideo.matchedStreams=[],a.trickModeVideo.createSegmentIndex=function(){if(a.trickModeVideo.segmentIndex)return Promise.resolve();
for(var g=new pm,h=u(a.trickModeVideo.matchedStreams),k=h.next();!k.done;k=h.next())g.h.push(k.value.segmentIndex);a.trickModeVideo.segmentIndex=g;return Promise.resolve()}),a.trickModeVideo.matchedStreams.push(b.trickModeVideo),ix(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&(a.trickModeVideo.matchedStreams.push(b),ix(a.trickModeVideo,b));b.dependencyStream?(a.dependencyStream||(a.dependencyStream=hx(b.dependencyStream),a.dependencyStream.matchedStreams=[],a.dependencyStream.createSegmentIndex=
function(){if(a.dependencyStream.segmentIndex)return Promise.resolve();for(var g=new pm,h=u(a.dependencyStream.matchedStreams),k=h.next();!k.done;k=h.next())g.h.push(k.value.segmentIndex);a.dependencyStream.segmentIndex=g;return Promise.resolve()}),a.dependencyStream.matchedStreams.push(b.dependencyStream),ix(a.dependencyStream,b.dependencyStream)):a.dependencyStream&&(a.dependencyStream.matchedStreams.push(b),ix(a.dependencyStream,b))}
function mx(a,b){var c=a.roles;c||(c=[]);for(var d=u(b.roles),e=d.next();!e.done;e=d.next())e=e.value,c.includes(e)||c.push(e);a.roles=c;c=u(b.keyIds);for(d=c.next();!d.done;d=c.next())a.keyIds.add(d.value);a.encrypted=a.encrypted&&b.encrypted;a.segments.push.apply(a.segments,x(b.segments));if(b.closedCaptions)for(a.closedCaptions||(a.closedCaptions=new Map),b=u(b.closedCaptions),c=b.next();!c.done;c=b.next())d=u(c.value),c=d.next().value,d=d.next().value,a.closedCaptions.set(c,d)}
function rx(a,b,c,d){d=(d===void 0?0:d)?c.matchedStreams:[];b=u(b);for(var e=b.next();!e.done;e=b.next()){e=ux(a,e.value,c);if(!e)return;d.push(e)}c.matchedStreams=d}
function ux(a,b,c){var d={audio:bx,video:cx,text:dx,image:ex}[c.type],e=null,f=d(c);if(b.has(f))e=b.get(f);else{f={audio:function(l,m){return qx(l,m)},video:function(l,m){return qx(l,m)},text:vx,image:wx}[c.type];for(var g={audio:xx,video:yx,text:zx,image:Ax}[c.type],h=u(b.values()),k=h.next();!k.done;k=h.next())k=k.value,!f(c,k)||c.fastSwitching!=k.fastSwitching||e&&!g(c,e,k)||(e=k)}a.u&&!px(e)&&b.delete(d(e));return e}
function Bx(a,b){return a.mimeType!=b.mimeType?!1:Cx(a.codecs)===Cx(b.codecs)}p.Uj=function(a){this.u=a};function qx(a,b){return a.drmInfos&&!Bg(a.drmInfos,b.drmInfos)?!1:!0}function vx(a,b){return b.language?a.forced!==b.forced||Ic(a.language,b.language)==0||b.kind!=a.kind?!1:!0:!0}function wx(){return!0}
function xx(a,b,c){var d=Dx(a,b,c);if(d===Ex)return!0;if(d===Fx)return!1;d=Ic(a.language,b.language);var e=Ic(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(b.label!==c.label){if(a.label===b.label)return!1;if(a.label===c.label)return!0}if(a.roles.length){d=b.roles.filter(function(f){return a.roles.includes(f)});e=c.roles.filter(function(f){return a.roles.includes(f)});if(e.length>d.length)return!0;if(e.length<d.length)return!1;if(c.roles.length!==b.roles.length)return c.roles.length<b.roles.length}else{if(!c.roles.length&&
b.roles.length)return!0;if(c.roles.length&&!b.roles.length)return!1}if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;d=Gx(a.channelsCount,b.channelsCount,c.channelsCount);if(d==Ex)return!0;if(d==Fx)return!1;d=Gx(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==Ex?!0:d==Fx?!1:a.bandwidth&&Hx(a.bandwidth,b.bandwidth,c.bandwidth)==Ex?!0:!1}
function yx(a,b,c){var d=Dx(a,b,c);if(d===Ex)return!0;if(d===Fx)return!1;d=Gx(a.width*a.height,b.width*b.height,c.width*c.height);if(d==Ex)return!0;if(d==Fx)return!1;if(a.frameRate){d=Gx(a.frameRate,b.frameRate,c.frameRate);if(d==Ex)return!0;if(d==Fx)return!1}return a.bandwidth&&Hx(a.bandwidth,b.bandwidth,c.bandwidth)==Ex?!0:!1}
function zx(a,b,c){var d=Ic(a.language,b.language),e=Ic(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;if(b.label!==c.label){if(a.label===b.label)return!1;if(a.label===c.label)return!0}if(a.roles.length){d=b.roles.filter(function(f){return a.roles.includes(f)});e=c.roles.filter(function(f){return a.roles.includes(f)});if(e.length>d.length)return!0;if(e.length<d.length)return!1}else{if(!c.roles.length&&b.roles.length)return!0;
if(c.roles.length&&!b.roles.length)return!1}return c.mimeType!=a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function Ax(a,b,c){return Gx(a.width*a.height,b.width*b.height,c.width*c.height)==Ex?!0:!1}
function kx(a){return{id:0,originalId:"",groupId:null,primary:!1,type:a,mimeType:"",codecs:"",language:"",originalLanguage:null,label:null,width:null,height:null,encrypted:!1,keyIds:new Set,segments:[],variantIds:[],roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,external:!1,fastSwitching:!1,isAudioMuxedInVideo:!1,baseOriginalId:null}}
function fx(a){return{id:0,originalId:"",groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new mm([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",originalLanguage:null,label:null,type:a,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1,
baseOriginalId:null}}function Gx(a,b,c){if(b==a&&a!=c)return Fx;if(c==a&&a!=b)return Ex;if(b>a){if(c<=a||c-a<b-a)return Ex;if(c-a>b-a)return Fx}else{if(c>a)return Fx;if(a-c<a-b)return Ex;if(a-c>a-b)return Fx}return Ix}function Dx(a,b,c){var d=a.mimeType===b.mimeType&&a.codecs===b.codecs,e=a.mimeType===c.mimeType&&a.codecs===c.codecs;if(d&&!e)return Fx;if(!d&&e)return Ex;b=Bx(a,b);a=Bx(a,c);return b&&!a?Fx:!b&&a?Ex:Ix}function Hx(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?Ex:b<a?Fx:Ix}
function px(a){switch(a.type){case vc:return!a.language;case "image":return!a.tilesLayout;default:return!1}}function cx(a){return Jx([a.fastSwitching,a.width,a.frameRate,a.codecs,a.mimeType,a.label,a.roles,a.closedCaptions?Array.from(a.closedCaptions.entries()):null,a.bandwidth,a.dependencyStream?a.dependencyStream.baseOriginalId:null,Array.from(a.keyIds)])}
function bx(a){return Jx([a.fastSwitching,a.channelsCount,a.language,a.bandwidth,a.label,a.codecs,a.mimeType,a.roles,a.audioSamplingRate,a.primary,a.dependencyStream?a.dependencyStream.baseOriginalId:null,Array.from(a.keyIds)])}function dx(a){return Jx([a.language,a.label,a.codecs,a.mimeType,a.bandwidth,a.roles])}function ex(a){return Jx([a.width,a.codecs,a.mimeType])}function Jx(a){return JSON.stringify(a)}function Cx(a){if(!Kx.has(a)){var b=mf(a);Kx.set(a,b)}return Kx.get(a)}
S("shaka.util.PeriodCombiner",$w);$w.prototype.setUseStreamOnce=$w.prototype.Uj;$w.prototype.combinePeriods=$w.prototype.Qg;$w.prototype.deleteStream=$w.prototype.Ri;$w.prototype.getImageStreams=$w.prototype.Vk;$w.prototype.getTextStreams=$w.prototype.xh;$w.prototype.getVariants=$w.prototype.El;var Ex=1,Ix=0,Fx=-1,Kx=new Map;function Lx(a,b){var c=new DOMParser,d=Mx.value()(a);a=null;try{a=c.parseFromString(d,"text/xml")}catch(e){return null}c=a.documentElement;if(!c||c.getElementsByTagName("parsererror").length||c.tagName!=b)return null;if(!("createNodeIterator"in document))return c;for(b=document.createNodeIterator(a,NodeFilter.SHOW_ALL);a=b.nextNode();)if(a instanceof HTMLElement||a instanceof SVGElement)return null;return c}function Nx(a,b){try{var c=ac(a);return Lx(c,b)}catch(d){return null}}
var Mx=new Sb(function(){if(typeof trustedTypes!=="undefined"){var a=trustedTypes.createPolicy("shaka-player#xml",{createHTML:function(b){return b}});return function(b){return a.createHTML(b)}}return function(b){return b}});function Ox(){var a=this;this.j=this.g=null;this.C=[];this.h=null;this.Fa=1;this.H=[];this.l={Qf:"",type:"",profiles:[],Ec:null,Cb:0,mb:null,Ge:0};this.A=new Map;this.D=new Map;this.u=new Map;this.F=new Map;this.sa=new Map;this.m=new $w;this.K=0;this.ya=new Pc(5);this.L=new Gf(function(){if(a.J&&!a.g.continueLoadingWhenPaused&&(a.I.Ea(a.J,"timeupdate"),a.J.paused)){a.I.ua(a.J,"timeupdate",function(){return Px(a)});return}Px(a)});this.P=new ch;this.O=null;this.G=[];this.Z=Infinity;this.oa=!1;this.i=
null;this.M=0;this.R=!1;this.I=new Wc;this.J=null;this.T=!1;this.W="";this.ea=function(){return!1};this.V=[];this.aa=new Set;this.ra=new Xv}p=Ox.prototype;p.configure=function(a,b){var c=this.j&&a.updatePeriod!=this.g.updatePeriod&&a.updatePeriod>=0;this.g=a;b&&(this.ea=b);c&&this.h&&this.h.presentationTimeline.U()&&this.L.Ka();this.i&&this.i.configure(this.g);this.m&&this.m.Uj(this.g.dash.useStreamOnceInPeriodFlattening)};
p.start=function(a,b){var c=this,d;return Q(function(e){if(e.g==1)return c.oa=b.isLowLatencyMode(),c.C=[a],c.j=b,E(e,Qx(c),2);d=e.h;c.j&&Rx(c,d);if(!c.j)throw new U(2,7,7001);return e.return(c.h)})};
p.stop=function(){for(var a=u(this.u.values()),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.m&&this.m.release();this.g=this.j=null;this.C=[];this.h=null;this.u.clear();this.F.clear();this.A.clear();this.D.clear();this.l={Qf:"",type:"",profiles:[],Ec:null,Cb:0,mb:null,Ge:0};this.m=null;this.L!=null&&(this.L.stop(),this.L=null);this.i&&this.i.destroy();this.I&&(this.I.release(),this.I=null);this.aa.clear();this.ra.release();return this.P.destroy()};
p.update=function(){var a=this,b;return Q(function(c){if(c.g==1)return sa(c,2),E(c,Qx(a),4);if(c.g!=2)return ua(c,0);b=va(c);if(!a.j||!b)return c.return();a.j.onError(b);H(c)})};p.onExpirationUpdated=function(){};p.onInitialVariantChosen=function(a){if(this.h&&this.h.presentationTimeline.U()){var b=a.video||a.audio;if(b&&b.segmentIndex){a=this.h.presentationTimeline.Tc();var c=b.segmentIndex.find(a);c!=null&&(b=b.segmentIndex.get(c))&&(this.K=b.endTime-a,Rx(this,0))}}};
p.banLocation=function(a){this.i&&this.i.banLocation(a)};p.setMediaElement=function(a){this.J=a};
function Qx(a){var b,c,d,e,f,g,h,k,l,m,n;return Q(function(q){if(q.g==1)return b=4,c="MPD",d=Sx(a),e=a.C,d.length?(e=d,c="Patch",b=6):a.C.length>1&&a.i&&(f=Zw(a.i,"Location",!0),f.length&&(e=f)),g=jh(e,a.g.retryParameters),h=Date.now(),E(q,Tx(a,g,0,{type:b}),2);if(q.g!=3){k=q.h;if(!a.j)return q.return(0);k.uri&&k.uri!=k.originalUri&&!a.C.includes(k.uri)&&a.C.unshift(k.uri);l=new tb(k.uri);a.W=l.g.toString();return E(q,Ux(a,k.data,k.uri,c),3)}m=Date.now();n=(m-h)/1E3;a.ya.sample(1,n);a.aa.clear();
return q.return(n)})}
function Ux(a,b,c,d){var e,f,g,h,k,l,m,n,q,r,t;return Q(function(v){if(v.g==1){e=b;f=a.g.dash.manifestPreprocessor;g=oo;if(f!=g){bd("manifest.dash.manifestPreprocessor configuration","Please Use manifest.dash.manifestPreprocessorTXml instead.");h=Nx(e,d);if(!h)throw new U(2,4,4001,c);f(h);e=bc(h.outerHTML)}k=Nd(e,d);if(!k)throw new U(2,4,4001,c);l=a.g.dash.manifestPreprocessorTXml;m=po;l!=m&&l(k);if(d==="Patch")return v.return(Vx(a,k));if(n=a.g.dash.disableXlinkProcessing)return v.return(Wx(a,k,c));
q=a.g.dash.xlinkFailGracefully;r=lw(k,a.g.retryParameters,q,c,a.j.networkingEngine);dh(a.P,r);return E(v,r.promise,2)}t=v.h;return v.return(Wx(a,t,c))})}
function Wx(a,b,c){var d,e,f,g,h,k,l,m,n,q,r,t,v,w,z,y,A,C,F,D,B,G,K,I,J,L,N,P,O,M,R,V,xa,ba,Oa,Ha,Ia,Fa,wa,Ca,Ma,La,Ba,eb,hb,pb,Ua,Fc,ic,Fg,sd,Ne,Ed,Gg,Qk,li;return Q(function(kd){switch(kd.g){case 1:a.i&&a.i.l.clear();d=[c];e=[];f=new Map;g=Vd(b,"Location");h=u(g);for(k=h.next();!k.done;k=h.next())if(l=k.value,m=l.attributes.serviceLocation,n=Xd(l))q=pc(d,[n])[0],m&&(a.i?Yw(a.i,"Location",m,q):f.set(m,q)),e.push(q);a.i?(r=Zw(a.i,"Location",!0),r.length>0&&(d=a.C=r)):e.length&&(d=a.C=e);a.l.Qf=b.attributes.id||
"";a.l.Ge=be(b,"publishTime",ee)||0;a.H=Vd(b,"PatchLocation");t=Promise.resolve();if((v=Zd(b,"ContentSteering"))&&a.j){w=v.attributes.defaultServiceLocation;if(a.i)a.i.i=d,a.i.h=w;else if(a.i=new Uw(a.j),a.i.configure(a.g),a.i.setManifestType("DASH"),a.i.i=d,a.i.h=w,z=Xd(v))(y=be(v,"queryBeforeStart",le,!1))?t=Vw(a.i,z):Vw(a.i,z);A=u(f.keys());for(C=A.next();!C.done;C=A.next())F=C.value,D=f.get(F),Yw(a.i,"Location",F,D)}B=Vd(b,"BaseURL");G=!1;if(a.i)for(K=u(B),I=K.next();!I.done;I=K.next())J=I.value,
L=J.attributes.serviceLocation,N=Xd(J),L&&N&&(Yw(a.i,"BaseURL",L,N),G=!0);a.V.splice(0);G&&a.i||(P=B.map(Xd),a.V.push.apply(a.V,x(pc(d,P))));O=a.i;M=a.V;R=function(){return O&&G?Zw(O,"BaseURL"):M.slice()};a.l.mb=R;V=0;B&&B.length&&(V=be(B[0],"availabilityTimeOffset",ke)||0);a.l.Cb=V;a.K=be(b,"minimumUpdatePeriod",fe,-1);xa=be(b,"availabilityStartTime",ee);ba=be(b,"timeShiftBufferDepth",fe);Oa=a.g.dash.ignoreSuggestedPresentationDelay;Ha=null;Oa||(Ha=be(b,"suggestedPresentationDelay",fe));Ia=a.g.dash.ignoreMaxSegmentDuration;
Fa=null;Ia||(Fa=be(b,"maxSegmentDuration",fe));wa=b.attributes.type||"static";a.h&&a.h.presentationTimeline&&(a.T=a.h.presentationTimeline.U()&&wa=="static");a.l.type=wa;if(a.h)for(Ca=a.h.presentationTimeline,Ma=Ca.Pb(),La=u(a.u.values()),Ba=La.next();!Ba.done;Ba=La.next())eb=Ba.value,eb.segmentIndex&&eb.segmentIndex.cb(Ma);else hb=a.g.dash.ignoreMinBufferTime,pb=0,hb||(pb=be(b,"minBufferTime",fe)||0),Ua=0,Ua=Ha!=null?Math.min(Ha,ba||Infinity):a.g.defaultPresentationDelay>0?a.g.defaultPresentationDelay:
Math.min(pb*1.5,ba||Infinity),Ca=new Ol(xa,Ua,a.g.dash.autoCorrectDrift);Ca.td(wa=="static");(Fc=Ca.U())&&!isNaN(a.g.availabilityWindowOverride)&&(ba=a.g.availabilityWindowOverride);ba==null&&(ba=Infinity);Ca.jg(ba);ic=b.attributes.profiles||"";a.l.profiles=ic.split(",");Fg={Mb:wa!="static",presentationTimeline:Ca,Aa:null,qa:null,va:null,N:null,bandwidth:0,Dh:!1,Cb:V,Ec:null,profiles:ic.split(","),roles:null,Tb:function(){return""}};return E(kd,t,2);case 2:a.M=0;sd=Xx(a,Fg,R,b,!1);Ne=sd.duration;
Ed=sd.periods;(wa!="static"||a.T)&&sd.Ti||Ca.Ib(Ne||Infinity);a.R&&a.oa&&Ca.Pj(a.Z);Ca.Lh(Fa||1);a.R&&a.oa&&(Gg=Ha!=null?Ha:a.g.defaultPresentationDelay,Ca.ci(Gg));if(!a.h)return E(kd,a.m.Qg(Ed,Fg.Mb),6);a.h.periodCount=Ed.length;a.h.gapCount=a.M;return E(kd,Yx(a,Ed,!1),4);case 6:a.h={presentationTimeline:Ca,variants:a.m.l,textStreams:a.m.xh(),imageStreams:a.m.i,offlineSessionIds:[],sequenceMode:a.g.dash.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:Zx(b),nextUrl:$x(b),
periodCount:Ed.length,gapCount:a.M,isLowLatency:a.R,startTime:null};if(!Ca.jk()){kd.B(7);break}Qk=Vd(b,"UTCTiming");return E(kd,ay(a,R,Qk),8);case 8:li=kd.h;if(!a.j)return kd.return();Ca.Qj(li);case 7:Ca.Mf(),a.m&&!a.h.presentationTimeline.U()&&a.m.release();case 4:a.j.makeTextStreamsForClosedCaptions(a.h),by(a),cy(a,Ed),H(kd)}})}
function Yx(a,b,c){var d;return Q(function(e){if(e.g==1)return E(e,a.m.Qg(b,!0,c),2);a.h.variants=a.m.l;d=a.m.xh();d.length>0&&(a.h.textStreams=d);a.h.imageStreams=a.m.i;a.j.filter(a.h);H(e)})}
function Vx(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,t,v,w,z,y,A,C,F,D,B,G,K,I,J,L;return Q(function(N){if(N.g==1){c=b.attributes.mpdId;d=be(b,"originalPublishTime",ee);if(!c||c!==a.l.Qf||d!==a.l.Ge)throw a.H=[],new U(1,4,4052);e=[];f=[];g=new Set;h=u(Ud(b));for(k=h.next();!k.done;k=h.next())if(l=k.value,m=oe(l.attributes.sel||""),n=m[m.length-1],q=Xd(l)||"",n.name==="MPD")if(n.Oc==="mediaPresentationDuration"){r=Xd(l)||"";var P=fe(r);if(P!=null){a.l.Ec=P;for(var O=u(a.A.values()),M=O.next();!M.done;M=O.next())M.value.Ec=
P}}else if(n.Oc==="type"){a.h.presentationTimeline.td(q=="static");a.l.type=q;P=u(a.A.values());for(O=P.next();!O.done;O=P.next())O.value.Mb=q=="dynamic";q=="static"&&(a.K=-1)}else n.Oc==="publishTime"?a.l.Ge=ee(q)||0:n.Oc===null&&l.tagName==="add"&&f.push(l);else if(n.name==="PatchLocation")pe(a.H,l);else if(n.name==="Period")l.tagName==="add"?f.push(l):l.tagName==="remove"&&n.id&&dy(a,n.id);else if(n.name==="SegmentTemplate"){O=oe(l.attributes.sel||"");P=O[O.length-1];if(P.Oc){O=ey(a,O);M=Xd(l)||
"";for(var R=u(O),V=R.next();!V.done;V=R.next())V=a.A.get(V.value),re(V.N.bd,l.tagName,P.Oc,M);P=O}else P=[];t=P;v=u(t);for(w=v.next();!w.done;w=v.next())z=w.value,g.add(z)}else if(n.name==="SegmentTimeline"||n.name==="S"){P=oe(l.attributes.sel||"");P=ey(a,P);O=u(P);for(M=O.next();!M.done;M=O.next())M=a.A.get(M.value),M=iw(M,Kw,"SegmentTimeline"),R=Vd(M,"S"),pe(R,l),M.children=R;y=P;A=u(y);for(C=A.next();!C.done;C=A.next())F=C.value,g.add(F)}D=u(g);for(B=D.next();!B.done;B=D.next())G=B.value,fy(a,
G);K=u(f);for(I=K.next();!I.done;I=K.next())J=I.value,e.push.apply(e,x(gy(a,J)));if(!e.length)return N.B(2);a.h.periodCount+=e.length;a.h.gapCount=a.M;return E(N,Yx(a,e,!0),2)}a.l.type=="static"&&(L=a.l.Ec,a.h.presentationTimeline.Ib(L||Infinity));H(N)})}
function gy(a,b){return Xx(a,{Mb:a.l.type=="dynamic",presentationTimeline:a.h.presentationTimeline,Aa:null,qa:null,va:null,N:null,bandwidth:0,Dh:!1,Cb:a.l.Cb,profiles:a.l.profiles,Ec:a.l.Ec,roles:null,Tb:function(){return""}},a.l.mb,b,!0).periods}function dy(a,b){a.h.periodCount--;for(var c=u(a.A.keys()),d=c.next();!d.done;d=c.next())if(d=d.value,d.startsWith(b)){var e=a.A.get(d);iw(e,Kw,"SegmentTimeline").children=[];fy(a,d);a.A.delete(d)}a.G=a.G.filter(function(f){return f!==b})}
function ey(a,b){var c="",d="",e=-1,f="";b=u(b);for(var g=b.next();!g.done;g=b.next())g=g.value,g.name==="Period"?c=g.id:g.name==="AdaptationSet"?(d=g.id,g.position!==null&&(e=g.position)):g.name==="Representation"&&(f=g.id);b=[];if(f)b.push(c+","+f);else if(d)for(e=u(a.A.values()),a=e.next();!a.done;a=e.next())a=a.value,a.Aa.id===c&&a.va.id===d&&a.N.id&&b.push(c+","+a.N.id);else if(e>-1)for(d=u(a.A.values()),a=d.next();!a.done;a=d.next())a=a.value,a.Aa.id===c&&a.va.position===e&&a.N.id&&b.push(c+
","+a.N.id);return b}function fy(a,b){var c=a.A.get(b),d=a.u.get(b);d.segmentIndex&&d.segmentIndex.cb(a.h.presentationTimeline.Pb());try{var e=Jw(c,function(f,g,h,k){return hy(a,f,g,h,k)},a.u,!0,a.g.dash.initialSegmentLimit,a.sa,c.N.aesKey,null,!0,a.D);d.createSegmentIndex=function(){return Q(function(f){if(f.g==1)return d.segmentIndex?f.B(0):E(f,e.jd(),3);d.segmentIndex=f.h;H(f)})}}catch(f){if(b=c.N.contentType,b!=vc&&b!="application"&&b!="image"||f.code!=4002)throw f;}}
function Zx(a){var b=Zd(a,"ServiceDescription");if(!b)return null;a=Zd(b,"Latency");b=Zd(b,"PlaybackRate");if(!a&&!b)return null;var c={};a&&("target"in a.attributes&&(c.targetLatency=parseInt(a.attributes.target,10)/1E3),"max"in a.attributes&&(c.maxLatency=parseInt(a.attributes.max,10)/1E3),"min"in a.attributes&&(c.minLatency=parseInt(a.attributes.min,10)/1E3));b&&("max"in b.attributes&&(c.maxPlaybackRate=parseFloat(b.attributes.max)),"min"in b.attributes&&(c.minPlaybackRate=parseFloat(b.attributes.min)));
return c}function $x(a){a=Vd(a,"SupplementalProperty");if(!a.length)return null;a=u(a);for(var b=a.next();!b.done;b=a.next())if(b=b.value,b.attributes.schemeIdUri=="urn:mpeg:dash:chaining:2016")return b.attributes.value;return null}
function Xx(a,b,c,d,e){var f=b.Ec;f||(f=be(d,"mediaPresentationDuration",fe),a.l.Ec=f);var g=0;a.h&&a.h.presentationTimeline&&a.T&&(g=a.h.presentationTimeline.jc());var h=[],k=g;d=Vd(d,"Period");for(var l=0;l<d.length;l++){var m=d[l],n=d[l+1],q=be(m,"start",fe,k),r=m.attributes.id,t=be(m,"duration",fe);q=l==0&&q==0&&a.T?g:q;var v=null;if(n){var w=be(n,"start",fe);w!=null&&(v=w-q+g)}else f!=null&&(v=f-q+g);w=yc;v&&t&&Math.abs(v-t)>w&&v>t&&a.M++;v==null&&(v=t);if(!(a.O!==null&&r!==null&&q!==null&&q<
a.O)||a.G.includes(r)||l+1==d.length){q!==null&&(a.O===null||q>a.O)&&(a.O=q);k=iy(a,b,c,{start:q,duration:v,node:m,Ff:v==null||!n});h.push(k);b.Aa.id&&v&&a.sa.set(b.Aa.id,v);if(v==null){k=null;break}k=q+v}}if(e)for(b=u(h),c=b.next();!c.done;c=b.next())c=c.value.id,a.G.includes(c)||a.G.push(c);else a.G=h.map(function(z){return z.id});return f!=null?{periods:h,duration:f+g,Ti:!1}:{periods:h,duration:k,Ti:!0}}
function by(a){var b=Array.from(a.F.keys()).filter(function(h){return!a.G.includes(h)});b=u(b);for(var c=b.next();!c.done;c=b.next()){c=c.value;for(var d=!0,e=u(a.F.get(c)),f=e.next();!f.done;f=e.next()){f=f.value;var g=a.u.get(f);g&&(g.segmentIndex&&g.segmentIndex.getNumReferences()!=0?d=!1:(a.m&&a.m.Ri(g,c),a.u.delete(f)))}d&&a.F.delete(c)}}function cy(a,b){b=new Set(b.map(function(e){return e.id}));for(var c=u(a.D.keys()),d=c.next();!d.done;d=c.next())d=d.value,b.has(d)||a.D.delete(d)}
function iy(a,b,c,d){b.Aa=jy(a,d.node,null,c);b.qa=d;b.Aa.Cb=b.Cb;b.Aa.id||(b.Aa.id="__shaka_period_"+d.start);var e=Vd(d.node,"EventStream");c=b.presentationTimeline.Pb();e=u(e);for(var f=e.next();!f.done;f=e.next())ky(a,d.start,d.duration,f.value,c);c=Vd(d.node,"SupplementalProperty");c=u(c);for(e=c.next();!e.done;e=c.next())if(e=e.value,e.attributes.schemeIdUri=="urn:mpeg:dash:urlparam:2014"&&(e=ly(a,e)))b.Tb=e;c=Vd(d.node,"AdaptationSet").map(function(r,t){return my(a,b,t,r)}).filter(Jf);if(b.Mb){e=
[];f=u(c);for(var g=f.next();!g.done;g=f.next()){g=u(g.value.sm);for(var h=g.next();!h.done;h=g.next())e.push(h.value)}if(e.length!=(new Set(e)).size)throw new U(2,4,4018);}e=new Map;f=u(c);for(g=f.next();!g.done;g=f.next())for(g=u(g.value.Ek),h=g.next();!h.done;h=g.next()){var k=u(h.value);h=k.next().value;k=k.next().value;e.set(h,k)}if(e.size)for(f=null,g=u(c),h=g.next();!h.done;h=g.next()){h=h.value;k=[];for(var l=u(h.streams),m=l.next(),n={};!m.done;n={mi:void 0},m=l.next())if(n.mi=m.value,e.has(n.mi.originalId)){f||
(f=Vd(d.node,"AdaptationSet").map(function(r,t){return my(a,b,t,r)}).filter(Jf));m=u(f);for(var q=m.next();!q.done;q=m.next())if(q=q.value.streams.find(function(r){return function(t){return t.originalId==r.mi.originalId}}(n)))q.dependencyStream=e.get(q.originalId),q.originalId+=q.dependencyStream.originalId,k.push(q)}k.length&&h.streams.push.apply(h.streams,x(k))}d=c.filter(function(r){return!r.wi});c=c.filter(function(r){return r.wi});if(!a.g.disableIFrames)for(c=u(c),e=c.next();!e.done;e=c.next())for(e=
e.value,f=e.wi.split(" "),g=u(d),h=g.next();!h.done;h=g.next())if(h=h.value,f.includes(h.id))for(h=u(h.streams),k=h.next();!k.done;k=h.next())tg(k.value,e.streams);c=ny(a.g.disableAudio,d,"audio");e=ny(a.g.disableVideo,d,"video");f=ny(a.g.disableText,d,vc);d=ny(a.g.disableThumbnails,d,"image");if(e.length===0&&c.length===0)throw new U(2,4,4004);return{id:b.Aa.id,audioStreams:c,videoStreams:e,textStreams:f,imageStreams:d}}
function ny(a,b,c){return a||!b.length?[]:b.reduce(function(d,e){if(e.contentType!=c)return d;d.push.apply(d,x(e.streams));return d},[])}
function my(a,b,c,d){function e(L){var N=L.attributes["dvb:fontFamily"];L=L.attributes["dvb:url"];N&&L&&(L=pc(b.va.mb(),[L],b.Tb()),a.j.addFont(N,L[0]))}function f(L){switch(L){case 1:case 5:case 6:case 7:return"srgb";case 9:return"rec2020";case 11:case 12:return"p3"}}function g(L){switch(L){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.va=jy(a,d,b.Aa,null);b.va.position=c;var h=!1;c=Vd(d,"Role");var k=c.map(function(L){return L.attributes.value}).filter(Jf),
l=void 0,m=b.va.contentType==vc;m&&(l="subtitle");c=u(c);for(var n=c.next();!n.done;n=c.next()){n=n.value;var q=n.attributes.schemeIdUri;if(q==null||q=="urn:mpeg:dash:role:2011")switch(n=n.attributes.value,n){case "main":h=!0;break;case "caption":case "subtitle":l=n}}var r=Vd(d,"EssentialProperty");c=null;var t=!1;n=null;q=!1;r=u(r);for(var v=r.next();!v.done;v=r.next()){v=v.value;var w=v.attributes.schemeIdUri;if(w=="http://dashif.org/guidelines/trickmode")c=v.attributes.value;else if(w=="urn:mpeg:mpegB:cicp:TransferCharacteristics")var z=
g(parseInt(v.attributes.value,10));else if(w=="urn:mpeg:mpegB:cicp:ColourPrimaries")var y=f(parseInt(v.attributes.value,10));else w!="urn:mpeg:mpegB:cicp:MatrixCoefficients"&&(w=="urn:mpeg:dash:ssr:2023"&&a.g.dash.enableFastSwitching?t=!0:w=="urn:dvb:dash:fontdownload:2014"?e(v):w=="urn:mpeg:dash:urlparam:2014"?(n=ly(a,v))||(q=!0):q=!0)}if(q)return null;var A=null;q=Vd(d,"SupplementalProperty");q=u(q);for(r=q.next();!r.done;r=q.next())r=r.value,v=r.attributes.schemeIdUri,v=="http://dashif.org/guidelines/last-segment-number"?
A=parseInt(r.attributes.value,10)-1:v=="urn:mpeg:mpegB:cicp:TransferCharacteristics"?z=g(parseInt(r.attributes.value,10)):v=="urn:mpeg:mpegB:cicp:ColourPrimaries"?y=f(parseInt(r.attributes.value,10)):v=="urn:dvb:dash:fontdownload:2014"?e(r):v=="urn:mpeg:dash:urlparam:2014"&&(n=ly(a,r));n&&(b.Tb=n);n=Vd(d,"Accessibility");var C=new Map,F;n=u(n);for(q=n.next();!q.done;q=n.next())if(r=q.value,q=r.attributes.schemeIdUri,r=r.attributes.value,q!="urn:scte:dash:cc:cea-608:2015"||a.g.disableText)if(q!="urn:scte:dash:cc:cea-708:2015"||
a.g.disableText)q=="urn:mpeg:dash:role:2011"?r!=null&&(k.push(r),r=="captions"&&(l="caption")):q=="urn:tva:metadata:cs:AudioPurposeCS:2007"&&(r=="1"?F="visually impaired":r=="2"?F="hard of hearing":r=="9"&&(F="spoken subtitles"));else if(q=1,r!=null)for(r=u(r.split(";")),v=r.next();!v.done;v=r.next()){w=v.value;var D=v=void 0;w.includes("=")?(w=w.split("="),v="svc"+w[0],D=w[1].split(",")[0].split(":").pop()):(v="svc"+q,q++,D=w);C.set(v,Bc(D))}else C.set("svc1","und");else if(q=1,r!=null)for(r=r.split(";"),
v=u(r),w=v.next();!w.done;w=v.next()){D=w.value;var B=w=void 0;D.includes("=")?(D=D.split("="),w=D[0].startsWith("CC")?D[0]:"CC"+D[0],B=D[1]||"und"):(w="CC"+q,r.length==2?q+=2:q++,B=D);C.set(w,Bc(B))}else C.set("CC1","und");n=Vd(d,"ContentProtection");var G=Yv(a.ra,n,a.g.ignoreDrmInfo,a.g.dash.keySystemsByURI);b.va.encrypted=n.length>0;var K=Bc(b.va.language||"und"),I=b.va.label,J=new Map;d=Vd(d,"Representation");if(!a.g.ignoreSupplementalCodecs){n=[];q=u(d);for(r=q.next();!r.done;r=q.next())if(v=
r.value,r=ce(v,"urn:scte:dash:scte214-extensions","supplementalCodecs"))v=Kd(v),v.attributes.codecs=r.split(" ").join(","),v.attributes.id&&(v.attributes.supplementalId=v.attributes.id+"_supplementalCodecs"),n.push(v);d.push.apply(d,x(n))}n=d.map(function(L){var N=oy(a,b,G,l,K,I,h,k,C,L,F,A);return N&&(N.hdr=N.hdr||z,N.colorGamut=N.colorGamut||y,N.fastSwitching=t,L=L.attributes.dependencyId)?(N.baseOriginalId=L,J.set(L,N),null):N}).filter(function(L){return!!L});if(n.length==0&&J.size==0){c=b.va.contentType==
"image";if(a.g.dash.ignoreEmptyAdaptationSet||m||c)return null;throw new U(2,4,4003);}if(!b.va.contentType||b.va.contentType=="application")for(b.va.contentType=py(n[0].mimeType,n[0].codecs),m=u(n),q=m.next();!q.done;q=m.next())q.value.type=b.va.contentType;m=b.va.id||"__fake__"+a.Fa++;q=u(n);for(r=q.next();!r.done;r=q.next()){r=r.value;v=u(G.drmInfos);for(w=v.next();!w.done;w=v.next())w=w.value,w.keyIds=w.keyIds&&r.keyIds?new Set([].concat(x(w.keyIds),x(r.keyIds))):w.keyIds||r.keyIds;a.g.enableAudioGroups&&
(r.groupId=m)}d=d.map(function(L){return L.attributes.supplementalId||L.attributes.id}).filter(Jf);return{id:m,contentType:b.va.contentType,language:K,oo:h,streams:n,drmInfos:G.drmInfos,wi:c,sm:d,Ek:J}}
function ly(a,b){if((b=$d(b,"urn:mpeg:dash:schema:urlparam:2014","UrlQueryInfo"))&&be(b,"useMPDUrlQuery",le,!1)){var c=b.attributes.queryTemplate;if(c)return function(){return c=="$querypart$"?a.W:c.split("&").map(function(d){if(d=="$querypart$")return a.W;var e=/\$query:(.*?)\$/g.exec(d);if(e&&e.length==2){e=e[1];var f=(new zb(a.W)).get(e);if(f.length)return e+"="+f[0]}return d}).join("&")}}return null}
function oy(a,b,c,d,e,f,g,h,k,l,m,n){b.N=jy(a,l,b.va,null);var q=b.N.id;a.Z=Math.min(a.Z,b.N.Cb);a.R=a.Z>0;if(!qy(b.N))return null;var r=b.qa.start;b.bandwidth=be(l,"bandwidth",ie)||0;b.roles=h;var t=Vd(l,"SupplementalProperty"),v=Vd(l,"EssentialProperty"),w=Vd(l,"ContentProtection");l=null;var z=v.find(function(O){return O.attributes.schemeIdUri=="urn:mpeg:dash:urlparam:2014"});z?l=ly(a,z):(z=t.find(function(O){return O.attributes.schemeIdUri=="urn:mpeg:dash:urlparam:2014"}))&&(l=ly(a,z));l&&(b.Tb=
l);z=b.N.contentType;l=z==vc||z=="application";z=z=="image";w.length&&(b.va.encrypted=!0);try{var y=void 0;if(c.Jg){var A=b.N.mb,C=b.Tb,F=pc(A(),[c.Jg.Tl],C()),D=jh(F,a.g.retryParameters);y={bitsKey:128,blockCipherMode:"CBC",iv:c.Jg.iv,firstMediaSequenceNumber:0,fetchKey:function(){var O,M,R;return Q(function(V){if(V.g==1)return E(V,Tx(a,D,6),2);if(V.g!=3){O=V.h;if(!O.data||O.data.byteLength!=16)throw new U(2,4,4049);M={name:"AES-CBC"};R=y;return E(V,window.crypto.subtle.importKey("raw",O.data,M,
!0,["decrypt"]),3)}R.cryptoKey=V.h;y.fetchKey=void 0;H(V)})}}}b.N.aesKey=y;A=function(O,M,R,V){return hy(a,O,M,R,V)};if(b.N.Yd)var B=yw(b,A,y);else if(b.N.Lc)B=Ew(b,a.u,y);else if(b.N.bd)B=Jw(b,A,a.u,!!a.h,a.g.dash.initialSegmentLimit,a.sa,y,n,!1,a.D);else{var G=b.qa.duration||0,K=b.N.mb,I=b.N.mimeType,J=b.N.codecs;B={endTime:-1,timeline:-1,jd:function(){var O=om(r,G,K());O.Nb(function(M){M.mimeType=I;M.codecs=J});return Promise.resolve(O)},timescale:1}}}catch(O){if((l||z)&&O.code==4002)return null;
throw O;}n=bw(a.ra,w,c,a.g.ignoreDrmInfo,a.g.dash.keySystemsByURI);n=new Set(n?[n]:[]);w=!1;t.some(function(O){return O.attributes.schemeIdUri=="tag:dolby.com,2018:dash:EC3_ExtensionType:2018"&&O.attributes.value=="JOC"})&&(w=!0);t=!1;l&&(t=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var L;if(z&&((v=v.find(function(O){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(O.attributes.schemeIdUri)}))&&(L=v.attributes.value),!L))return null;
var N;l=b.N.codecs;b.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&(l.includes("hvc1.2.4.L153.B0")||l.includes("hev1.2.4.L153.B0"))&&(N="PQ");v=b.N.id?b.Aa.id+","+b.N.id:"";a.H.length&&q&&a.A.set(b.Aa.id+","+q,ry(b));b.N.Yf&&sy(a,b.N.Yf,B,b.presentationTimeline);B.endTime!=-1&&b.Aa.id!=null&&b.N.id!=null&&((q=a.D.get(b.Aa.id))?(q.endTime=B.endTime,q.Uh.includes(b.N.id)||q.Uh.push(b.N.id),a.D.set(b.Aa.id,q)):a.D.set(b.Aa.id,{endTime:B.endTime,timeline:B.timeline,Uh:[b.N.id]}));
var P=v&&a.u.has(v)?a.u.get(v):{id:a.Fa++,originalId:b.N.id,groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){P.segmentIndex&&(P.segmentIndex.release(),P.segmentIndex=null)},segmentIndex:null,mimeType:b.N.mimeType,codecs:l,frameRate:b.N.frameRate,pixelAspectRatio:b.N.pixelAspectRatio,bandwidth:b.bandwidth,width:b.N.width,height:b.N.height,kind:d,encrypted:c.drmInfos.length>0,drmInfos:c.drmInfos,keyIds:n,language:e,originalLanguage:b.va.language,label:f,
type:b.va.contentType,primary:g,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:b.N.emsgSchemeIdUris,roles:h,forced:t,channelsCount:b.N.Tf,audioSamplingRate:b.N.audioSamplingRate,spatialAudio:w,closedCaptions:k,hdr:N,colorGamut:void 0,videoLayout:void 0,tilesLayout:L,accessibilityPurpose:m,external:!1,fastSwitching:!1,fullMimeTypes:new Set([gf(b.N.mimeType,b.N.codecs)]),isAudioMuxedInVideo:!1,baseOriginalId:null};P.createSegmentIndex=function(){var O;return Q(function(M){if(M.g==1){if(P.segmentIndex)return M.B(0);
O=P;return E(M,B.jd(),3)}O.segmentIndex=M.h;H(M)})};v&&b.Mb&&!a.u.has(v)&&(b=b.Aa.id||"",a.F.has(b)||a.F.set(b,[]),a.u.set(v,P),a.F.get(b).push(v));return P}
function sy(a,b,c,d){if(!a.aa.has(b)){a.aa.add(b);var e=be(b,"presentationTime",je)||0,f=Zd(b,"UTCTiming"),g;if(g=f&&f.attributes.schemeIdUri)f=f.attributes.schemeIdUri,g=!(f==="urn:mpeg:dash:utc:http-ntp:2014"||f==="urn:mpeg:dash:utc:ntp:2014"||f==="urn:mpeg:dash:utc:sntp:2014");g?b=(be(b,"wallClockTime",ee)||0)*1E3:(b=be(b,"wallClockTime",je)||0,b=mk(b));c=new Date(b-e/c.timescale*1E3);e=c.getTime()/1E3;isNaN(e)||(d.u||d.ei(e),d=(new Map).set("detail",{wallClockTime:b,programStartDate:c}),d=new T("prft",
d),a.j.onEvent(d))}}function ry(a){function b(c){if(!c)return null;c=Ld(c);c.Yd=null;c.Lc=null;c.bd=te(c.bd);c.Yf=null;return c}a=Ld(a);a.Aa=b(a.Aa);a.va=b(a.va);a.N=b(a.N);a.qa&&(a.qa=Ld(a.qa),a.qa.node=null);return a}
function Px(a){var b,c;return Q(function(d){switch(d.g){case 1:return b=0,sa(d,2),E(d,Qx(a),4);case 4:b=d.h;ua(d,3);break;case 2:if(c=va(d),a.j){if(a.g.raiseFatalErrorOnManifestUpdateRequestFailure)return a.j.onError(c),d.return();c.severity=1;a.j.onError(c)}case 3:if(!a.j)return d.return();a.j.onManifestUpdated();Rx(a,b);H(d)}})}function Rx(a,b){if(!(a.K<0)){var c=a.K;a.g.updatePeriod>=0&&(c=a.g.updatePeriod);a.L.Y(Math.max(c-b,Qc(a.ya)))}}
function jy(a,b,c,d){c=c||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,Tf:null,audioSamplingRate:null,Cb:0,gg:1,encrypted:!1};d=d||c.mb;var e=b.attributes.id,f=b.attributes.supplementalId,g=Vd(b,"BaseURL"),h,k=!1;if(a.i)for(var l=u(g),m=l.next();!m.done;m=l.next()){var n=m.value;m=n.attributes.serviceLocation;n=Xd(n);m&&n&&(Yw(a.i,e,m,n),k=!0)}k&&a.i||(h=g.map(Xd));var q=a.i;a=b.attributes.contentType||c.contentType;l=b.attributes.mimeType||c.mimeType;
m=Tm([b.attributes.codecs||c.codecs]).join(",");n=be(b,"frameRate",me)||c.frameRate;var r=b.attributes.sar||c.pixelAspectRatio,t=ty(Vd(b,"InbandEventStream"),c.emsgSchemeIdUris),v=Vd(b,"AudioChannelConfiguration");v=uy(v)||c.Tf;var w=be(b,"audioSamplingRate",je)||c.audioSamplingRate;a||(a=py(l,m));var z=Zd(b,"SegmentBase"),y=Zd(b,"SegmentTemplate"),A=z?be(z,"availabilityTimeOffset",ke)||0:0,C=y?be(y,"availabilityTimeOffset",ke)||0:0,F=g&&g.length?be(g[0],"availabilityTimeOffset",ke)||0:0;A=c.Cb+F+
A+C;C=null;(F=Zd(b,"SegmentSequenceProperties"))&&(F=be(F,"cadence",ie))&&(C=F);F=b.attributes.label;var D=Vd(b,"Label");D&&D.length&&(D=D[0],Wd(D)&&(F=Wd(D)));return{mb:function(){return pc(d(),g.length?q&&k?Zw(q,e):h?h:[]:[])},Yd:z||c.Yd,Lc:Zd(b,"SegmentList")||c.Lc,bd:y||c.bd,Yf:Zd(b,"ProducerReferenceTime")||c.Yf,width:be(b,"width",je)||c.width,height:be(b,"height",je)||c.height,contentType:a,mimeType:l,codecs:m,frameRate:n,pixelAspectRatio:r,emsgSchemeIdUris:t,id:f||e,originalId:e,language:b.attributes.lang,
Tf:v,audioSamplingRate:w,Cb:A,Cf:null,gg:C||c.gg,label:F||null,encrypted:!1}}function ty(a,b){b=b.slice();a=u(a);for(var c=a.next();!c.done;c=a.next())c=c.value.attributes.schemeIdUri,b.includes(c)||b.push(c);return b}
function uy(a){a=u(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;var c=b.attributes.schemeIdUri;if(c&&(b=b.attributes.value))switch(c){case "urn:mpeg:dash:outputChannelPositionList:2012":return b.trim().split(/ +/).length;case "urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case "urn:dts:dash:audio_channel_configuration:2012":b=parseInt(b,10);if(!b)continue;return b;case "tag:dolby.com,2015:dash:audio_channel_configuration:2015":c=[2,1,2,2,2,2,1,2,2,1,1,1,1,2,1,1,2,2];b=parseInt(b,
16);if(!b)continue;for(var d=0,e=0;e<c.length;e++)b&1<<e&&(d+=c[e]);if(d)return d;continue;case "tag:dolby.com,2014:dash:audio_channel_configuration:2011":case "urn:dolby:dash:audio_channel_configuration:2011":c=[1,1,1,1,1,2,2,1,1,2,2,2,1,2,1,1].reverse();b=parseInt(b,16);if(!b)continue;for(e=d=0;e<c.length;e++)b&1<<e&&(d+=c[e]);if(d)return d;continue;case "urn:mpeg:mpegB:cicp:ChannelConfiguration":if(c=[0,1,2,3,4,5,6,8,2,3,4,7,8,24,8,12,10,12,14,12,14],(b=parseInt(b,10))&&b>0&&b<c.length)return c[b]}}return null}
function qy(a){var b=a.Yd?1:0;b+=a.Lc?1:0;b+=a.bd?1:0;if(b==0)return a.contentType==vc||a.contentType=="application"?!0:!1;b!=1&&(a.Yd&&(a.Lc=null),a.bd=null);return!0}
function vy(a,b,c,d){var e,f,g,h,k,l,m;return Q(function(n){if(n.g==1)return e=[ec(c)],f=pc(b(),e),g=jh(f,a.g.retryParameters),g.method=d,h=a.j.networkingEngine.request(4,g,{isPreload:a.ea()}),dh(a.P,h),E(n,h.promise,2);k=n.h;if(d=="HEAD"){if(!k.headers||!k.headers.date)return n.return(0);l=k.headers.date}else l=Yb(k.data);m=Date.parse(l);return isNaN(m)?n.return(0):n.return(m-Date.now())})}
function ay(a,b,c){var d,e,f,g,h,k,l,m;return Q(function(n){switch(n.g){case 1:d=c.map(function(q){return{scheme:q.attributes.schemeIdUri,value:q.attributes.value}}),e=a.g.dash.clockSyncUri,!d.length&&e&&d.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:e}),f=u(d),g=f.next();case 2:if(g.done){n.B(4);break}h=g.value;sa(n,5);k=h.scheme;l=h.value;switch(k){case "urn:mpeg:dash:utc:http-head:2014":case "urn:mpeg:dash:utc:http-head:2012":return n.B(7);case "urn:mpeg:dash:utc:http-xsdate:2014":case "urn:mpeg:dash:utc:http-iso:2014":case "urn:mpeg:dash:utc:http-xsdate:2012":case "urn:mpeg:dash:utc:http-iso:2012":return n.B(8);
case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return m=Date.parse(l),n.return(isNaN(m)?0:m-Date.now());case "urn:mpeg:dash:utc:http-ntp:2014":case "urn:mpeg:dash:utc:ntp:2014":case "urn:mpeg:dash:utc:sntp:2014":bb("NTP UTCTiming scheme is not supported");break;default:bb("Unrecognized scheme in UTCTiming element",k)}n.B(9);break;case 7:return E(n,vy(a,b,l,"HEAD"),10);case 10:return n.return(n.h);case 8:return E(n,vy(a,b,l,"GET"),11);case 11:return n.return(n.h);case 9:ua(n,
3);break;case 5:va(n);case 3:g=f.next();n.B(2);break;case 4:return bb("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),n.return(0)}})}
function ky(a,b,c,d,e){var f=d.attributes.schemeIdUri||"",g=d.attributes.value||"",h=be(d,"timescale",je)||1,k=be(d,"presentationTimeOffset",je)||0;d=u(Vd(d,"Event"));for(var l=d.next();!l.done;l=d.next()){l=l.value;var m=be(l,"presentationTime",je)||0,n=be(l,"duration",je)||0;m=Math.max((m-k)/h+b,b);n=m+n/h;c!=null&&(m=Math.min(m,b+c),n=Math.min(n,b+c));n<e||(l={schemeIdUri:f,value:g,startTime:m,endTime:n,id:l.attributes.id||"",timescale:h,eventElement:se(l),eventNode:te(l)},a.j.onTimelineRegionAdded(l))}}
function hy(a,b,c,d,e){var f,g,h,k;return Q(function(l){if(l.g==1)return f=ph,g=e?0:1,h=Xm(b,c,d,a.g.retryParameters),E(l,Tx(a,h,f,{type:g}),2);k=l.h;return l.return(k.data)})}function py(a,b){b=gf(a,b);return wf(b)?vc:a.split("/")[0]}function Tx(a,b,c,d){d||(d={});d.isPreload=a.ea();b=a.j.networkingEngine.request(c,b,d);dh(a.P,b);return b.promise}
function Sx(a){var b=a.l.Ge;if(!a.l.Qf||!b||!a.H.length)return[];var c=Date.now()/1E3,d=a.H.filter(function(e){e=je(e.attributes.ttl);return!e||b+e>c}).map(Xd).filter(Jf);return d.length?pc(a.C,d):[]}S("shaka.dash.DashParser",Ox);Ni("application/dash+xml",function(){return new Ox});Ni("video/vnd.mpeg.dash.mpd",function(){return new Ox});function wy(){}S("shaka.dependencies",wy);wy.has=function(a){return xy.has(a)};wy.add=function(a,b){if(!yy[a])throw Error(a+" is not supported");a==zy?bd("mux.js","mux.js is no longer used in Shaka Player."):xy.set(a,function(){return b})};var zy="muxjs",yy={po:zy,ISOBoxer:"ISOBoxer"};wy.Allowed=yy;var xy=new Map([["ISOBoxer",function(){return window.ISOBoxer}]]);function Ay(){this.j=new Sb(function(){return["Oculus","Quest"].some(function(a){return navigator.userAgent.includes(a.toLowerCase())})?"VR":navigator.userAgent.match(/Smart( ?|_)TV/i)||navigator.userAgent.match(/Android ?TV/i)?"TV":navigator.userAgentData?navigator.userAgentData.mobile?"MOBILE":"DESKTOP":/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)?"MOBILE":navigator.userAgentData&&navigator.userAgentData.platform?navigator.userAgentData.platform.toLowerCase()=="android"?"MOBILE":"DESKTOP":navigator.userAgent.includes("Android")?
"MOBILE":"DESKTOP"});this.l=new Sb(function(){return navigator.vendor.includes("Apple")&&(navigator.userAgent.includes("Version/")||navigator.userAgent.includes("OS/"))?"WEBKIT":navigator.userAgent.includes("Edge/")?"EDGE":navigator.userAgent.includes("Chrome/")?"CHROMIUM":navigator.userAgent.includes("Firefox/")?"GECKO":"UNKNOWN"})}function Qi(){var a=window.ManagedMediaSource||window.MediaSource;return a&&a.isTypeSupported?!0:!1}p=Ay.prototype;p.qc=function(){return!!navigator.mediaCapabilities};
p.Oa=function(){return this.j.value()};p.Ja=function(){return this.l.value()};p.Vd=function(){return!1};p.Fj=function(){return!1};p.Df=function(){return!1};p.Gj=function(){return!1};p.Ie=function(){return!1};p.wd=function(){return!0};p.dd=function(){return!0};p.Me=function(){return!0};p.Lj=function(){return 0};p.yc=function(){return Promise.resolve({width:Infinity,height:Infinity})};p.Wj=function(){return!1};p.ki=function(){return!1};
p.ab=function(a){var b=this.Oa();if(b==="TV"||b==="CONSOLE"||b==="CAST")a.ads.customPlayheadTracker=!0,a.ads.skipPlayDetection=!0,a.ads.supportsMultipleMediaElements=!1;return a};p.oi=function(){return!!window.indexedDB};p.Dj=function(){return[]};p.Jd=function(a){return window.matchMedia!==void 0&&window.matchMedia("(color-gamut: p3)").matches?a?"HLG":"PQ":"SDR"};p.mg=function(){return!1};p.qj=function(){return!1};p.Yh=function(){return!1};p.og=function(){return!0};p.rj=function(){return!1};
p.ek=function(){return!0};p.vd=function(){return!1};p.Kh=function(a){return a==="com.apple.fps"};p.ng=function(){return!0};p.toString=function(){return"Device: "+this.Wb()+" v"+this.Ga()+"; Type: "+this.Oa()};function By(){Ay.call(this);this.g=new Sb(function(){var a=navigator.userAgent.match(/Version\/(\d+)/);return a?parseInt(a[1],10):(a=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(a[1],10):null});this.h=new Sb(function(){return/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)||navigator.maxTouchPoints>1?"xr"in navigator?"APPLE_VR":"MOBILE":"xr"in navigator?"APPLE_VR":"DESKTOP"})}ma(By,Ay);p=By.prototype;p.Ga=function(){return this.g.value()};p.Wb=function(){return"Apple Browser"};p.Oa=function(){return this.h.value()};
p.Ja=function(){return"WEBKIT"};p.qc=function(){return!1};p.Vd=function(a,b){return b==="audio"};p.Df=function(){return!0};p.Gj=function(a){return a==="audio"};p.ab=function(a){Ay.prototype.ab.call(this,a);a.abr.minTimeToSwitch=.5;return a};p.mg=function(){return!0};p.ng=function(){return!1};
(navigator.vendor||"").includes("Apple")&&(/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)||navigator.maxTouchPoints>1||navigator.userAgentData&&navigator.userAgentData.platform&&navigator.userAgentData.platform.toLowerCase()=="macos"||navigator.platform&&navigator.platform.toLowerCase().includes("mac"))&&(Vb=function(){return new By});function Cy(){if(!Dy())throw Error("Not a Chromecast device!");Ay.call(this);this.h=new Sb(function(){var a=navigator.userAgent.match(/Chrome\/(\d+)/);return a?parseInt(a[1],10):null});this.g=new Sb(function(){var a=navigator.userAgentData&&navigator.userAgentData.platform||navigator.userAgent;a=a.toLowerCase();return a.includes("android")?Ey:a.includes("fuchsia")?Fy:Gy})}ma(Cy,Ay);p=Cy.prototype;p.Ga=function(){return this.h.value()};p.Wb=function(){return"Chromecast with "+this.g.value()};
p.Oa=function(){return"CAST"};p.Ja=function(){return"CHROMIUM"};p.qc=function(){return Ay.prototype.qc.call(this)&&this.g.value()!==Gy};p.dd=function(){return this.g.value()!==Gy};p.Lj=function(){switch(this.g.value()){case Ey:return 0;case Fy:return 3;default:return 1}};
p.yc=function(){var a,b,c,d,e;return Q(function(f){switch(f.g){case 1:a=window.cast&&cast.__platform__&&cast.__platform__.canDisplayType;b={width:1280,height:720};sa(f,2);if(!(c=a)){f.B(4);break}return E(f,cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160'),5);case 5:c=f.h;case 4:if(c){b.width=3840;b.height=2160;f.B(6);break}if(!(d=a)){f.B(7);break}return E(f,cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=1920; height=1080'),8);case 8:d=
f.h;case 7:d&&(b.width=1920,b.height=1080);case 6:ua(f,3);break;case 2:e=va(f),ab("Failed to check canDisplayType:",e);case 3:return f.return(b)}})};p.ab=function(a){Ay.prototype.ab.call(this,a);a.streaming.stallSkip=0;return a};p.oi=function(){return!1};p.vd=function(){return!0};function Dy(){return navigator.userAgent.includes("CrKey")&&!navigator.userAgent.includes("VIZIO SmartCast")}var Ey="Android",Fy="Fuchsia",Gy="Linux";Dy()&&(Vb=function(){return new Cy});function Hy(){Ay.call(this);var a=this;this.i=new Sb(function(){var b=navigator.userAgent.match(/(Chrome|Firefox)\/(\d+)/);return b?parseInt(b[2],10):null});this.g=new Sb(function(){return navigator.userAgent.match(/Edge?\//)?"Edge":navigator.userAgent.includes("Chrome")?"Chrome":navigator.userAgent.includes("Firefox")?"Firefox":"Unknown"});this.h=new Sb(function(){return navigator.userAgentData&&navigator.userAgentData.platform?navigator.userAgentData.platform.toLowerCase()=="windows":navigator.platform?
navigator.platform.toLowerCase().includes("win32"):!1});this.A=new Sb(function(){return navigator.userAgent.match(/Edge?\//)?!a.h.value():!0});this.u=new Sb(function(){return navigator.userAgent.includes("sony.hbbtv.tv")});this.m=new Sb(function(){return navigator.userAgentData&&navigator.userAgentData.platform?navigator.userAgentData.platform.toLowerCase()=="android":navigator.userAgent.includes("Android")?!0:!1})}ma(Hy,Ay);p=Hy.prototype;p.Ga=function(){return this.i.value()};p.Wb=function(){return this.g.value()};
p.Vd=function(a){return Eg(a)?this.g.value()==="Edge"&&this.h.value():!1};p.Fj=function(){return this.g.value()==="Edge"&&this.h.value()};p.Df=function(){return this.g.value()==="Edge"&&this.h.value()};p.dd=function(){return this.A.value()};
p.ab=function(a){Ay.prototype.ab.call(this,a);if(this.h.value())switch(this.g.value()){case "Firefox":a.drm.keySystemsMapping={"com.microsoft.playready":"com.microsoft.playready.recommendation"};break;case "Chrome":a.drm.keySystemsMapping={"com.microsoft.playready":"com.microsoft.playready.recommendation.3000","com.microsoft.playready.recommendation":"com.microsoft.playready.recommendation.3000"}}this.m.value()&&(a.drm.defaultAudioRobustnessForWidevine="",a.drm.defaultVideoRobustnessForWidevine="");
return a};p.Yh=function(){return this.g.value()==="Edge"||this.u.value()};p.vd=function(){if(this.Ja()==="GECKO"){var a=this.Ga();return a!==null?a>=100:Ay.prototype.vd.call(this)}return Ay.prototype.vd.call(this)};p.Kh=function(a){return this.Ja()==="GECKO"?a.startsWith("com.microsoft.playready.recommendation"):Ay.prototype.Kh.call(this,a)};Wb=function(){return new Hy};function Iy(){Ay.apply(this,arguments)}ma(Iy,Ay);p=Iy.prototype;p.Ga=function(){return null};p.Wb=function(){return"Hisense"};p.Oa=function(){return"TV"};p.qc=function(){return!1};p.yc=function(){var a={width:1920,height:1080},b=null;if(window.Hisense_Get4KSupportState)try{b=window.Hisense_Get4KSupportState()}catch(c){}b==null&&(b=navigator.userAgent.includes("UHD"));b&&(a.width=3840,a.height=2160);return Promise.resolve(a)};p.ab=function(a){Ay.prototype.ab.call(this,a);a.streaming.stallSkip=0;return a};
if(navigator.userAgent.includes("Hisense")||navigator.userAgent.includes("VIDAA"))Vb=function(){return new Iy};function Jy(){Ay.call(this);this.g=new Sb(function(){var a=navigator.userAgent.match(/PlayStation (\d+)/);return a?parseInt(a[1],10):null})}ma(Jy,Ay);p=Jy.prototype;p.Wb=function(){return"PlayStation"};p.Oa=function(){return"CONSOLE"};p.Ja=function(){return"WEBKIT"};p.Ga=function(){return this.g.value()};p.qc=function(){return!1};p.wd=function(){return!1};p.dd=function(){return!1};p.ki=function(){return this.Ga()===4};
p.yc=function(){var a,b,c,d,e;return Q(function(f){switch(f.g){case 1:return a={width:1920,height:1080},b=!1,sa(f,2),E(f,window.msdk.device.getDisplayInfo(),4);case 4:c=f.h;b=c.resolution==="4K";ua(f,3);break;case 2:return va(f),sa(f,5),E(f,window.msdk.device.getDisplayInfoImmediate(),7);case 7:d=f.h;b=d.resolution==="4K";ua(f,3);break;case 5:e=va(f),bb("PlayStation: Failed to get the display info:",e);case 3:return b&&(a.width=3840,a.height=2160),f.return(a)}})};
p.ab=function(a){Ay.prototype.ab.call(this,a);this.Ga()===4&&a.drm.preferredKeySystems.push("com.microsoft.playready");a.streaming.clearDecodingCache=!0;return a};p.Yh=function(){return this.Ga()===4};p.og=function(){return this.Ga()!==4};navigator.userAgent.includes("PlayStation")&&(Vb=function(){return new Jy});function Ky(){Ay.call(this);var a=navigator.userAgent.match(/Tizen (\d+).(\d+)/);this.g=a?parseInt(a[1],10):null;this.h=a?parseInt(a[2],10):null}ma(Ky,Ay);p=Ky.prototype;p.Ga=function(){return this.g};p.Wb=function(){return"Tizen"};p.Ja=function(){return"CHROMIUM"};p.Oa=function(){return"TV"};p.Vd=function(){return!0};p.Ie=function(){return this.Ga()===3};p.qc=function(){return!1};p.wd=function(){var a=this.Ga();return a!==null?a>=4:Ay.prototype.wd.call(this)};p.dd=function(){return!1};
p.Me=function(){return this.g&&this.h?this.g===5?this.h>=5:this.g>5:Ay.prototype.Me.call(this)};
p.yc=function(){var a=window.devicePixelRatio;a={width:window.screen.width*a>1920?3840:1920,height:window.screen.height*a>1080?2160:1080};try{if(webapis.systeminfo&&webapis.systeminfo.getMaxVideoResolution){var b=webapis.systeminfo.getMaxVideoResolution();a.width=b.width;a.height=b.height}else webapis.productinfo.is8KPanelSupported&&webapis.productinfo.is8KPanelSupported()?(a.width=7680,a.height=4320):webapis.productinfo.isUdPanelSupported&&webapis.productinfo.isUdPanelSupported()&&(a.width=3840,
a.height=2160)}catch(c){bb("Tizen: Error detecting screen size, default screen size 1920x1080.")}return Promise.resolve(a)};p.ab=function(a){Ay.prototype.ab.call(this,a);a.drm.ignoreDuplicateInitData=this.Ga()!==2;this.Ga()===3&&(a.streaming.crossBoundaryStrategy="reset_to_encrypted");a.streaming.shouldFixTimestampOffset=!0;a.streaming.stallSkip=0;a.streaming.gapPadding=2;return a};p.Dj=function(){var a=[];this.g!==null&&this.g<5&&a.push("opus");return a};
p.Jd=function(a){try{if(webapis.avinfo.isHdrTvSupport())return a?"HLG":"PQ"}catch(b){return Ay.prototype.Jd.call(this,a)}return"SDR"};p.qj=function(){return!0};p.rj=function(){return this.Ga()===3};navigator.userAgent.includes("Tizen")&&(Vb=function(){return new Ky});function Ly(){Ay.apply(this,arguments)}ma(Ly,Ay);Ly.prototype.Ga=function(){return null};Ly.prototype.Wb=function(){return"Vizio"};Ly.prototype.Oa=function(){return"TV"};Ly.prototype.qc=function(){return!1};navigator.userAgent.includes("VIZIO SmartCast")&&(Vb=function(){return new Ly});function My(){Ay.call(this);this.i=new Sb(function(){return navigator.userAgent.includes("DT_STB_BCM")||navigator.userAgent.includes("Sky_STB")});this.h=new Sb(function(){return navigator.userAgent.includes("SOPOpenBrowser")});this.g=new Sb(function(){if(navigator.userAgent.includes("DT_STB_BCM"))return 11;var a=navigator.userAgent.match(/Version\/(\d+)/);return a?parseInt(a[1],10):(a=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(a[1],10):null})}ma(My,Ay);p=My.prototype;p.Ga=function(){return this.g.value()};
p.Wb=function(){return"WebKit STB"};p.Oa=function(){return"TV"};p.Ja=function(){return"WEBKIT"};p.qc=function(){return!1};p.wd=function(){var a=this.g.value();return a!==null?a>=15:!0};p.Vd=function(){return this.h.value()};p.yc=function(){return Promise.resolve({width:window.screen.width*window.devicePixelRatio,height:window.screen.height*window.devicePixelRatio})};p.og=function(){return!this.i.value()};p.ng=function(){return!1};
if(navigator.userAgent.includes("SOPOpenBrowser")||navigator.userAgent.includes("DT_STB_BCM")||navigator.userAgent.includes("Sky_STB")||!(!(navigator.vendor||"").includes("Apple")||/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)||navigator.maxTouchPoints>1||navigator.userAgentData&&navigator.userAgentData.platform&&navigator.userAgentData.platform.toLowerCase()=="macos"||navigator.platform&&navigator.platform.toLowerCase().includes("mac")))Vb=function(){return new My};function Ny(){Ay.call(this);var a=this;this.h=Oy();this.g=null;try{var b=new PalmServiceBridge;b.onservicecallback=function(c){c=JSON.parse(c);a.g=c.configs["tv.model.supportHDR"]||c.configs["tv.config.supportDolbyHDRContents"]||!1};b.call("luna://com.webos.service.config/getConfigs",JSON.stringify({configNames:["tv.model.supportHDR","tv.config.supportDolbyHDRContents"]}))}catch(c){bb("WebOS: getConfigs call failed",c)}}ma(Ny,Ay);p=Ny.prototype;p.Ga=function(){return this.h};p.Wb=function(){return"WebOS"};
p.Oa=function(){return"TV"};p.Ja=function(){return"CHROMIUM"};p.qc=function(){return!1};p.wd=function(){var a=this.Ga();return a!==null?a>3:Ay.prototype.wd.call(this)};p.dd=function(){var a=this.Ga();return a!==null?a>6:Ay.prototype.dd.call(this)};p.Me=function(){var a=this.Ga();return a!==null?a>3:Ay.prototype.Me.call(this)};p.yc=function(){var a={width:1920,height:1080};try{var b=JSON.parse(window.PalmSystem.deviceInfo);a.width=Math.max(1920,b.screenWidth);a.height=Math.max(1080,b.screenHeight)}catch(c){bb("WebOS: Error detecting screen size, default screen size 1920x1080.")}return Promise.resolve(a)};
p.ab=function(a){Ay.prototype.ab.call(this,a);this.Ga()===3&&(a.streaming.crossBoundaryStrategy="reset");a.streaming.shouldFixTimestampOffset=!0;a.streaming.stallSkip=0;return a};p.Jd=function(a){return this.g==null?(bb("WebOS: getConfigs call haven't finished"),Ay.prototype.Jd.call(this,a)):this.g?a?"HLG":"PQ":"SDR"};
function Oy(){var a=null,b=navigator.userAgent.match(/Chrome\/(\d+)/);b&&(a=parseInt(b[1],10));switch(a){case 38:return 3;case 53:return 4;case 68:return 5;case 79:return 6;case 87:return 22;case 94:return 23;case 108:return 24;case 120:return 25;default:return null}}p.ek=function(){return!1};p.vd=function(){var a=this.Ga();return a!==null?a>=6:Ay.prototype.vd.call(this)};if(navigator.userAgent.includes("Web0S")){var Py=new Ny;Vb=function(){return Py}};function Qy(){Ay.call(this);this.g=navigator.userAgent.includes("Edge/");var a=navigator.userAgent.match(/Edge?\/(\d+)/);this.h=a?parseInt(a[1],10):null}ma(Qy,Ay);p=Qy.prototype;p.Ga=function(){return this.h};p.Wb=function(){return"Xbox"};p.Oa=function(){return"CONSOLE"};p.Ja=function(){return this.g?"EDGE":"CHROMIUM"};p.Vd=function(){return!0};p.Df=function(){return!0};p.Wj=function(){return this.g};
p.yc=function(){var a={width:1920,height:1080},b=Ry();if(b)try{var c=new b.Media.Protection.ProtectionCapabilities,d=b.Media.Protection.ProtectionCapabilityResult;b=null;do b=c.isTypeSupported('video/mp4;codecs="hvc1,mp4a";features="decode-res-x=3840,decode-res-y=2160,decode-bitrate=20000,decode-fps=30,decode-bpc=10,display-res-x=3840,display-res-y=2160,display-bpc=8"',"com.microsoft.playready.recommendation");while(b===d.maybe);b===d.probably&&(a.width=3840,a.height=2160)}catch(e){bb("Xbox: Error detecting screen size, default screen size 1920x1080.")}return Promise.resolve(a)};
p.ab=function(a){Ay.prototype.ab.call(this,a);a.drm.parseInbandPsshEnabled=this.g;a.drm.preferredKeySystems.push("com.microsoft.playready");this.g&&(a.streaming.gapPadding=.01);return a};p.oi=function(){return!1};function Ry(){var a=null;try{a=typeof Windows!=="undefined"?Windows:chrome.webview.hostObjects.sync.Windows}catch(b){}return a}if(navigator.userAgent.includes("Xbox One")||Ry()!==null)Vb=function(){return new Qy};function Sy(a,b,c){this.type=a;this.ka=b;this.segments=c||null}function Ty(a,b,c,d){this.id=a;this.name=b;this.attributes=c;this.value=d===void 0?null:d}Ty.prototype.toString=function(a){function b(e){return e.name+"="+(isNaN(Number(e.value))?'"'+e.value+'"':e.value)}var c="#"+this.name,d=this.attributes?this.attributes.filter(function(e){return a?!a.has(e.name):!0}).map(b):[];this.value&&d.unshift(this.value);d.length>0&&(c+=":"+d.join(","));return c};
function Uy(a,b){if(b)return a.toString();b=(new Set).add("AUDIO").add("VIDEO").add("SUBTITLES").add("PATHWAY-ID").add("GROUP-ID").add("URI");return a.toString(b)}function Vy(a,b){a=a.attributes.filter(function(c){return c.name==b});return a.length?a[0]:null}function Wy(a,b,c){return(a=Vy(a,b))?a.value:c||null}function Xy(a,b){a=Vy(a,b);if(!a)throw new U(2,4,4023,b);return a.value}function Yy(a,b,c){c=c===void 0?[]:c;this.ka=b;this.g=a;this.Hc=c}function Zy(a,b){this.name=a;this.value=b};function $y(a,b){return a.filter(function(c){return c.name==b})}function az(a,b){return a.filter(function(c){return Xy(c,"TYPE")==b})}function bz(a,b){a=u(a);for(var c=a.next();!c.done;c=a.next())if(c=c.value,c.name===b)return c;return null}function cz(a,b,c){c=c===void 0?0:c;return(a=bz(a,b))?Number(a.value):c}function dz(a,b,c){return b?ez(a,[b],c):[]}function ez(a,b,c){if(!b.length)return[];var d=b;c&&c.size&&(d=b.map(function(e){return fz(e,c)}));return pc(a,d)}
function fz(a,b){if(!b||!b.size)return a;a=String(a).replace(/%7B/g,"{").replace(/%7D/g,"}");var c=a.match(/{\$\w*}/g);if(c){c=u(c);for(var d=c.next();!d.done;d=c.next()){d=d.value;var e=d.slice(2,d.length-1),f=b.get(e);if(f)a=a.replace(d,f);else throw new U(2,4,4039,e);}}return a};function gz(){this.g=0}
function hz(a,b){b=Yb(b);b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim();var c=b.split(/\n+/m);if(!iz.test(c[0]))throw new U(2,4,4015);b=0;for(var d=!1,e=[],f=!0,g=0;g<c.length;g++){var h=c[g],k=c[g+1];if(h.startsWith("#")&&!h.startsWith("#EXT")||f)f=!1;else{h=jz(a,h);d||(kz.has(h.name)?(b=1,d=!0):h.name=="EXT-X-STREAM-INF"||h.name=="EXT-X-MEDIA"?d=!0:lz.has(h.name)&&(b=1,d=!0));if(lz.has(h.name)){if(b!=1)throw new U(2,4,4017);f=a;a=Array(Math.max(100,Math.floor((c.length-g)/2)));d=0;h=[];var l=[];
for(k=null;g<c.length;g++){var m=c[g];if(m.startsWith("#EXT"))m=jz(f,m),kz.has(m.name)?e.push(m):m.name=="EXT-X-MAP"?k=m:m.name=="EXT-X-PART"?l.push(m):m.name=="EXT-X-PRELOAD-HINT"?Wy(m,"TYPE")=="PART"?l.push(m):Wy(m,"TYPE")=="MAP"&&(m.name="EXT-X-MAP",k=m):h.push(m);else if(!m.startsWith("#")||m.startsWith("#EXT"))m=m.trim(),k&&h.push(k),h=new Yy(m,h,l),d<a.length?a[d++]=h:(a.push(h),d++),h=[],l=[]}l.length&&(k&&h.push(k),c=new Yy("",h,l),d<a.length?a[d++]=c:(a.push(c),d++));return new Sy(b,e,d<
a.length?a.slice(0,d):a)}e.push(h);h.name=="EXT-X-STREAM-INF"&&(h.attributes.push(new Zy("URI",k)),f=!0)}}return new Sy(b,e)}function jz(a,b){a=a.g++;var c=b.match(mz);if(!c)throw new U(2,4,4016,b);b=c[1];var d=c[2];c=[];var e;if(d){d=new Ad(d);var f;nz.lastIndex=0;(f=Cd(d,nz))&&(e=f[1]);oz.lastIndex=0;for(f=Cd(d,oz);f;)c.push(new Zy(f[1],f[2]||f[3])),Bd(d),f=Cd(d,oz)}return new Ty(a,b,c,e)}
var mz=/^#(EXT[^:]*)(?::(.*))?$/,iz=/^#EXTM3U($|[ \t\n])/m,nz=/^([^,=]+)(?:,|$)/g,oz=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g,kz=new Set("EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST EXT-X-SERVER-CONTROL EXT-X-SKIP EXT-X-PART-INF EXT-X-DATERANGE".split(" ")),lz=new Set("EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP EXT-X-GAP EXT-X-TILES".split(" "));function pz(){}function qz(a,b){try{var c=rz(a);return Zg({uri:a,originalUri:a,data:c.data,headers:{"content-type":c.contentType},originalRequest:b})}catch(d){return Xg(d)}}
function rz(a){var b=a.split(":");if(b.length<2||b[0]!="data")throw new U(2,1,1004,a);b=b.slice(1).join(":").split(",");if(b.length<2)throw new U(2,1,1004,a);var c=b[0];a=window.decodeURIComponent(b.slice(1).join(","));b=c.split(";");c=b[0];var d=!1;b.length>1&&b[b.length-1]=="base64"&&(d=!0,b.pop());var e;d?e=lc(a):e=bc(a);return{data:e,contentType:c}}S("shaka.net.DataUriPlugin",pz);pz.parse=qz;fh("data",qz);function sz(){var a=this;this.g=this.h=null;this.G=1;this.C=new Map;this.L=new Map;this.D=new Map;this.D.set("video",new Map);this.D.set("audio",new Map);this.D.set(vc,new Map);this.D.set("image",new Map);this.Gc=(new Map).set("com.apple.streamingkeydelivery",function(b,c,d){return tz(a,b,c,d)}).set("urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",function(b){var c=Xy(b,"METHOD");if(["SAMPLE-AES","SAMPLE-AES-CTR"].includes(c)){var d="cenc";c=="SAMPLE-AES"&&(d="cbcs");var e=Xy(b,"URI");c=rz(e.split("?")[0]);
e=e.split("?")[0];a.I.has(e)||(c=Lb(c.data),a.I.set(e,c));d=qc("com.widevine.alpha",d,[{initDataType:"cenc",initData:a.I.get(e)}]);(b=Wy(b,"KEYID"))&&d.keyIds.add(b.toLowerCase().substr(2));b=Promise.resolve(d)}else b=Promise.resolve(null);return b}).set("com.microsoft.playready",function(b){var c=Xy(b,"METHOD");if(["SAMPLE-AES","SAMPLE-AES-CTR"].includes(c)){var d="cenc";c=="SAMPLE-AES"&&(d="cbcs");b=Xy(b,"URI");b=rz(b.split("?")[0]);b=Lb(b.data);c=new Uint8Array([154,4,240,121,152,64,66,134,171,
146,230,91,224,136,95,149]);c=Kh(b,c,new Set,0);d=qc("com.microsoft.playready",d,[{initDataType:"cenc",initData:c}]);if(b=Od(["<PLAYREADY>",jc(b),"</PLAYREADY>"].join("\n")))d.licenseServerUri=Wv(b);d=Promise.resolve(d)}else d=Promise.resolve(null);return d}).set("urn:uuid:3d5e6d35-9b9a-41e8-b843-dd3c6e72c42c",function(b){var c=Xy(b,"METHOD");if(["SAMPLE-AES","SAMPLE-AES-CTR"].includes(c)){var d="cenc";c=="SAMPLE-AES"&&(d="cbcs");var e=Xy(b,"URI");c=rz(e.split("?")[0]);e=e.split("?")[0];a.I.has(e)||
(c=Lb(c.data),a.I.set(e,c));d=qc("com.huawei.wiseplay",d,[{initDataType:"cenc",initData:a.I.get(e)}]);(b=Wy(b,"KEYID"))&&d.keyIds.add(b.toLowerCase().substr(2));b=Promise.resolve(d)}else b=Promise.resolve(null);return b});this.jb=new Set;this.i=new Map;this.l=null;this.H="";this.Na=new gz;this.M=-1;this.aa=Infinity;this.Z=this.Kc=this.ib=!1;this.F=new Gf(function(){if(a.V&&!a.g.continueLoadingWhenPaused&&(a.T.Ea(a.V,"timeupdate"),a.V.paused)){a.T.ua(a.V,"timeupdate",function(){return uz(a)});return}uz(a)});
this.Fa=vz;this.m=null;this.fb=0;this.u=Infinity;this.hb=this.La=this.R=0;this.W=new ch;this.J=new Map;this.K=new Map;this.ya=new Map;this.oa=new Map;this.O=new Map;this.ra=new Map;this.sa=new Map;this.Jc=this.ea=!1;this.pb=new Pc(5);this.j=null;this.P=!0;this.T=new Wc;this.A=this.V=null;this.mc=function(){return!1};this.I=new Map}p=sz.prototype;
p.configure=function(a,b){var c=this.h&&a.updatePeriod!=this.g.updatePeriod&&a.updatePeriod>=0;this.g=a;b&&(this.mc=b);this.j&&this.j.configure(this.g);c&&this.m&&this.m.presentationTimeline.U()&&this.F.Ka()};p.start=function(a,b){var c=this,d;return Q(function(e){return e.g==1?(c.h=b,c.ea=b.isLowLatencyMode(),E(e,wz(c,[a]).promise,2)):e.g!=3?(d=e.h,c.H=d.uri,E(e,xz(c,d.data),3)):e.return(c.m)})};
p.stop=function(){this.F&&(this.F.stop(),this.F=null);var a=[];this.W&&(a.push(this.W.destroy()),this.W=null);this.g=this.h=null;this.jb.clear();this.m=null;this.i.clear();this.L.clear();this.K.clear();this.C.clear();this.ya.clear();this.oa.clear();this.O.clear();this.ra.clear();this.sa.clear();this.I.clear();this.j&&this.j.destroy();this.T&&(this.T.release(),this.T=null);return Promise.all(a)};
p.update=function(){var a=this,b,c,d,e,f,g,h,k,l,m;return Q(function(n){if(n.g==1){if(!yz(a))return n.return();b=[];c=Array.from(a.i.values());a.u=Infinity;a.m.gapCount=0;d=c.filter(function(q){return!q.stream.isAudioMuxedInVideo&&q.stream.segmentIndex});e=u(d);for(f=e.next();!f.done;f=e.next())g=f.value,b.push(zz(a,g));return E(n,Promise.all(b),2)}Az(a,d.map(function(q){return q.stream}));h=d.some(function(q){return q.se==0});d.length&&!h&&(Bz(a,vz),Cz(a));h&&Cz(a);k=u(d);for(l=k.next();!l.done;l=
k.next())m=l.value,m.stream.isAudioMuxedInVideo||!m.stream.segmentIndex||jg(m.stream.segmentIndex)||a.h.disableStream(m.stream);H(n)})};function Dz(a,b){return yz(a)?a.D.get(b.type):b.Nf}
function zz(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,t,v,w,z,y,A,C,F,D,B,G,K,I,J,L,N,P,O,M,R,V,xa,ba,Oa,Ha;return Q(function(Ia){switch(Ia.g){case 1:if(b.stream.isAudioMuxedInVideo)return Ia.return();c=[];d=u(b.S());for(e=d.next();!e.done;e=d.next())f=e.value,g=new tb(f),h=g.g,b.nf&&(b.ac>=0&&h.add("_HLS_msn",String(b.ac)),b.bc>=0&&h.add("_HLS_part",String(b.bc))),b.pf&&h.add("_HLS_skip","YES"),Ib(h)&&xb(g,yb(h.toString())),c.push(g.toString());sa(Ia,2);return E(Ia,wz(a,c,!0).promise,4);case 4:k=Ia.h;ua(Ia,
3);break;case 2:throw l=va(Ia),a.h&&a.h.disableStream(b.stream),l;case 3:if(!b.stream.segmentIndex)return Ia.return();m=hz(a.Na,k.data);if(m.type!=1)throw new U(2,4,4017);n=k.uri;n==k.originalUri||b.S().includes(n)||b.ag.push(n);q=$y(m.ka,"EXT-X-DEFINE");r=Ez(a,q,n);t=b.stream;v=Dz(a,b);return E(Ia,Fz(a,m,t.mimeType,b.S,r),5);case 5:w=Ia.h;z=w.keyIds;y=w.drmInfos;A=w.encrypted;C=w.Fi;t.encrypted||!A||C||(t.encrypted=!0);F=function(Fa,wa){return Fa.size===wa.size&&[].concat(x(Fa)).every(function(Ca){return wa.has(Ca)})};
F(t.keyIds,z)||(t.keyIds=z,t.drmInfos=y,a.h.newDrmInfo(t));D=Gz(a,m,v,r,b.S,b.type);B=D.segments;if(G=D.bandwidth)t.bandwidth=G;K=Bm(t);I=u(B);for(J=I.next();!J.done;J=I.next())L=J.value,L.ia&&(L.ia.Pd=K);t.segmentIndex.Be(B,a.l.Pb());B.length&&(N=cz(m.ka,"EXT-X-MEDIA-SEQUENCE",0),O=(P=bz(m.ka,"EXT-X-SKIP"))?Number(Wy(P,"SKIPPED-SEGMENTS")):0,M=Hz(N,B),R=M.ac,V=M.bc,b.ac=R+O,b.bc=V,xa=v.get(N),t.segmentIndex.cb(xa));if(ba=jg(t.segmentIndex))b.nd=ba.startTime,Oa=B[B.length-1],b.Zc=Oa.endTime;if(Ha=
bz(m.ka,"EXT-X-ENDLIST"))b.se=!0;Iz(a,m);Jz(a,m.ka,t.type,r,b.S);H(Ia)}})}p.onExpirationUpdated=function(){};p.onInitialVariantChosen=function(){};p.banLocation=function(a){this.j&&this.j.banLocation(a)};p.setMediaElement=function(a){this.V=a};
function Kz(a,b,c){c=c===void 0?!1:c;for(var d=a.M==-1,e=u(b),f=e.next();!f.done;f=e.next()){f=f.value;var g=f.stream.segmentIndex,h=Dz(a,f);if(g=jg(g)){h=u(h);for(var k=h.next();!k.done;k=h.next()){k=u(k.value);var l=k.next().value;if(k.next().value==g.startTime){d&&(a.M=Math.max(a.M,l));f.Xg=l;break}}}}if(!(a.M<0))for(b=u(b),d=b.next();!d.done;d=b.next())if(d=d.value,Lz(a,d.type)||c)if(e=d.stream.segmentIndex)if(f=a.M-d.Xg,f>0&&(e.g.splice(0,f),e=jg(e)))e=-e.startTime,d.stream.segmentIndex.offset(e),
Mz(a,d,e)}
function Nz(a,b){if(a.aa==Infinity){b=u(b);for(var c=b.next();!c.done;c=b.next())c=jg(c.value.stream.segmentIndex),c!=null&&c.h!=null&&(a.aa=Math.min(a.aa,c.h))}b=a.aa;if(b!=Infinity){c=u(a.i.values());for(var d=c.next();!d.done;d=c.next())if(d=d.value,!Lz(a,d.type)){var e=d.stream.segmentIndex;if(e!=null){var f=jg(e);if(f)if(f.h==null)ab("Missing EXT-X-PROGRAM-DATE-TIME for stream",d.S(),"Expect AV sync issues!");else for(Mz(a,d,f.h-b-f.startTime),d=u(e),e=d.next();!e.done;e=d.next())e.value.pi(b)}}}}
function Mz(a,b,c){if(!(Math.abs(c)<.001)){b.nd+=c;b.Zc+=c;a=Dz(a,b);for(var d=u(a),e=d.next();!e.done;e=d.next()){var f=u(e.value);e=f.next().value;f=f.next().value;a.set(e,f+c)}b.S()}}
function xz(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,t,v,w,z,y,A,C,F,D,B,G,K,I,J,L,N,P,O,M,R,V,xa,ba,Oa,Ha,Ia,Fa,wa,Ca,Ma,La;return Q(function(Ba){switch(Ba.g){case 1:c=xc;d=hz(a.Na,b);e=$y(d.ka,"EXT-X-DEFINE");f=[];g=[];h=[];a.l=new Ol(null,0);a.l.td(!0);k=function(){return[a.H]};l=null;m=new Map;if(d.type==1)return a.P=!1,R=$y(d.ka,"EXT-X-DEFINE"),m=Ez(a,R,a.H),l=c.Ha,V="",xa=new Map,E(Ba,Oz(a,a.G++,m,d,k,"",l,V,!0,"Media Playlist",null,xa,null,!1,null,!1),7);Pz(a,e);n=$y(d.ka,"EXT-X-MEDIA");q=$y(d.ka,
"EXT-X-STREAM-INF");r=$y(d.ka,"EXT-X-IMAGE-STREAM-INF");t=$y(d.ka,"EXT-X-I-FRAME-STREAM-INF");v=$y(d.ka,"EXT-X-SESSION-KEY");w=$y(d.ka,"EXT-X-SESSION-DATA");z=$y(d.ka,"EXT-X-CONTENT-STEERING");Qz(a,w);return E(Ba,Rz(a,z),4);case 4:if(!a.g.ignoreSupplementalCodecs){y=[];A=u(q);C=A.next();for(F={};!C.done;F={ck:void 0},C=A.next())if(D=C.value,B=Wy(D,"SUPPLEMENTAL-CODECS"))F.ck=B.split(/\s*,\s*/).map(function(eb){return eb.split("/")[0]}),G=D.attributes.map(function(eb){return function(hb){var pb=hb.name,
Ua=hb.value;pb=="CODECS"&&(Ua=eb.ck.join(","),hb=hb.value.split(","),hb.length>1&&(hb=tc("audio",hb))&&(Ua+=","+hb));return new Zy(pb,Ua)}}(F)),y.push(new Ty(D.id,D.name,G,null));q.push.apply(q,x(y));K=[];I=u(t);J=I.next();for(L={};!J.done;L={dk:void 0},J=I.next())if(N=J.value,P=Wy(N,"SUPPLEMENTAL-CODECS"))L.dk=P.split(/\s*,\s*/).map(function(eb){return eb.split("/")[0]}),O=N.attributes.map(function(eb){return function(hb){var pb=hb.name;hb=hb.value;pb=="CODECS"&&(hb=eb.dk.join(","));return new Zy(pb,
hb)}}(L)),K.push(new Ty(N.id,N.name,O,null));t.push.apply(t,x(K))}Sz(a,q);Tz(a,n);M=Uz(a,t);return E(Ba,Vz(a,q,v,n,k,a.C,M),5);case 5:return f=Ba.h,g=Wz(a,n),E(Ba,Xz(a,r,t),6);case 6:h=Ba.h;Ba.B(3);break;case 7:ba=Ba.h,a.i.set(a.H,ba),ba.stream&&(Oa=Bm(ba.stream),ba.stream.segmentIndex.Nb(function(eb){eb.ia&&(eb.ia.Pd=Oa)})),l=ba.stream.type,Ha=!0,a.g.disableAudio&&ba.type=="audio"?Ha=!1:a.g.disableVideo&&ba.type=="video"&&!ba.stream.codecs.includes(",")&&(Ha=!1),Ha&&f.push({id:0,language:Bc(V||"und"),
disabledUntilTime:0,primary:!0,audio:ba.type=="audio"?ba.stream:null,video:ba.type=="video"?ba.stream:null,bandwidth:ba.stream.bandwidth||0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.h)throw new U(2,7,7001);Yz(a,d);d.type==1&&(yz(a)&&(Zz(a,d),Ia=a.u,a.F.Y(Ia)),Fa=Array.from(a.i.values()),$z(a,Fa),Cz(a),Jz(a,d.ka,l,m,k));a.m={presentationTimeline:a.l,variants:f,textStreams:g,imageStreams:h,offlineSessionIds:[],sequenceMode:a.g.hls.sequenceMode,ignoreManifestTimestampsInSegmentsMode:a.g.hls.ignoreManifestTimestampsInSegmentsMode,
type:"HLS",serviceDescription:null,nextUrl:null,periodCount:1,gapCount:0,isLowLatency:!1,startTime:a.A};if(a.Z||!a.g.hls.disableCodecGuessing){Ba.B(8);break}wa=[];Ca=u(a.m.variants);for(Ma=Ca.next();!Ma.done;Ma=Ca.next())La=Ma.value,La.audio&&La.audio.codecs===""&&wa.push(La.audio.createSegmentIndex()),La.video&&La.video.codecs===""&&wa.push(La.video.createSegmentIndex());return E(Ba,Promise.all(wa),8);case 8:a.h.makeTextStreamsForClosedCaptions(a.m),H(Ba)}})}
function aA(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,t,v,w,z;return Q(function(y){if(y.g==1){c=Rm(a.g.hls.mediaPlaylistFullMimeType);if(!b.length)return y.return(c);d=bA(a,b);e=d.segment;f=d.segmentIndex;g=e.S();if(h=cp(g[0]))if(k=cA.get(h))return y.return(Rm(k));return E(y,Promise.all([dA(a,e.ia,0),dA(a,e,f)]),2)}l=y.h;m=l[1].mimeType;n=l[0].data;q=l[1].data;r="mp4 mp4a m4s m4i m4a m4f cmfa mp4v m4v cmfv fmp4".split(" ");t=["audio/mp4","video/mp4","video/iso.segment"];v=e.ia||t.includes(m);if(!v&&Hk(Lb(q))){var A=
q,C=a.g.disableAudio,F=a.g.disableVideo,D=a.g.disableText;var B=Lb(A);var G=(new zk).parse(B),K=G.pe();B=G.yh();var I=[],J=!1,L=!1;if(!C)switch(K.audio){case "aac":case "aac-loas":G.Eb().length&&(I.push("mp4a.40.2"),J=!0);break;case "mp3":G.Eb().length&&(I.push("mp4a.40.34"),J=!0);break;case "ac3":G.Eb().length&&(I.push("ac-3"),J=!0);break;case "ec3":G.Eb().length&&(I.push("ec-3"),J=!0);break;case "opus":G.Eb().length&&(I.push("opus"),J=!0)}if(!F)switch(K.video){case "avc":B.codec?I.push(B.codec):
I.push("avc1.42E01E");L=!0;break;case "hvc":B.codec?I.push(B.codec):I.push("hvc1.1.6.L93.90");L=!0;break;case "av1":I.push("av01.0.01M.08"),L=!0}if(I.length){C=J&&!L;F=new Map;if(L&&!D){D=new rd("video/mp2t");D.Wf(A);A=u(D.Bg());for(L=A.next();!L.done;L=A.next())L=L.value,F.set(L,L);D.ge()}B={type:C?"audio":"video",mimeType:"video/mp2t",codecs:I.join(", "),language:null,height:B.height,width:B.width,channelCount:null,sampleRate:null,closedCaptions:F,Pe:null,colorGamut:null,frameRate:B.frameRate}}else B=
null;if(w=B)return y.return(w)}else if(v||r.includes(h))if(z=Sm(n,q,a.g.disableText))return y.return(z);return m?y.return(Rm(m)):y.return(c)})}
function dA(a,b,c){var d,e,f,g,h,k;return Q(function(l){switch(l.g){case 1:if(!b)return l.return({mimeType:null,data:null});d=ph;e=Xm(b.S(),b.Uc(),b.Sc(),a.g.retryParameters);f=b instanceof Jj?1:0;return E(l,eA(a,e,d,{type:f}).promise,2);case 2:g=l.h;h=g.data;if(!b.aesKey){l.B(3);break}return E(l,Wm(h,b.aesKey,c),4);case 4:h=l.h;case 3:return b instanceof Jj?b.Ke(h,!0):b.Ke(h),(k=g.headers["content-type"])&&(k=k.split(";")[0].toLowerCase()),l.return({mimeType:k,data:h})}})}
function Cz(a){if(yz(a)){if(a.Fa==fA){for(var b=Infinity,c=Infinity,d=u(a.i.values()),e=d.next();!e.done;e=d.next())e=e.value,e.stream.segmentIndex&&e.stream.type!="text"&&!e.stream.isAudioMuxedInVideo&&(b=Math.min(b,e.Zc),c=Math.min(c,e.nd));b=b-c||0;isNaN(a.g.availabilityWindowOverride)||(b=a.g.availabilityWindowOverride);a.l.jg(b)}}else a.l.Ib(gA(a));if(!a.l.u)for(b=u(a.i.values()),c=b.next();!c.done;c=b.next())c=c.value,!c.stream.segmentIndex||c.type!="audio"&&c.type!="video"||(c=jg(c.stream.segmentIndex))&&
c.h&&a.l.ei(c.h);a.l.Mf()}function Pz(a,b){var c=(new tb(a.H)).g;b=u(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=Wy(e,"NAME");var f=Wy(e,"VALUE");e=Wy(e,"QUERYPARAM");d&&f&&(a.C.has(d)||a.C.set(d,f));e&&(d=c.get(e)[0])&&!a.C.has(d)&&a.C.set(e,d)}}
function Ez(a,b,c){c=(new tb(c)).g;var d=new Map;b=u(b);for(var e=b.next();!e.done;e=b.next()){var f=e.value,g=Wy(f,"NAME"),h=Wy(f,"VALUE");e=Wy(f,"QUERYPARAM");f=Wy(f,"IMPORT");g&&h&&(d.has(g)||d.set(g,h));e&&(g=c.get(e)[0])&&!d.has(g)&&d.set(e,g);f&&(e=a.C.get(f))&&d.set(f,e)}return d}
function Sz(a,b){b=u(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Wy(d,"AUDIO");c=Wy(d,"VIDEO");var f=Wy(d,"SUBTITLES");d=hA(a,d);if(f){var g=tc(vc,d);a.K.set(f,g);Tc(d,g)}e&&(f=tc("audio",d),f||(f=a.g.hls.defaultAudioCodec),a.K.set(e,f));c&&(e=tc("video",d),e||(e=a.g.hls.defaultVideoCodec),a.K.set(c,e))}}
function Qz(a,b){b=u(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Wy(d,"DATA-ID");c=Wy(d,"URI");var f=Wy(d,"LANGUAGE");d=Wy(d,"VALUE");e=(new Map).set("id",e);c&&e.set("uri",dz([a.H],c,a.C)[0]);f&&e.set("language",f);d&&e.set("value",d);c=new T("sessiondata",e);if(a.h)a.h.onEvent(c)}}
function Rz(a,b){var c,d,e,f,g,h;return Q(function(k){if(!a.h||!a.g)return k.return();d=u(b);for(e=d.next();!e.done;e=d.next())if(f=e.value,g=Wy(f,"PATHWAY-ID"),h=Wy(f,"SERVER-URI"),g&&h){a.j=new Uw(a.h);a.j.configure(a.g);a.j.i=[a.H];a.j.setManifestType("HLS");a.j.h=g;c=Vw(a.j,h);break}return E(k,c,0)})}
function Wz(a,b){var c=az(b,"SUBTITLES");b=c.map(function(g){if(a.g.disableText)return null;try{return iA(a,[g],new Map).stream}catch(h){if(a.g.hls.ignoreTextStreamFailures)return null;throw h;}});c=u(c);for(var d=c.next();!d.done;d=c.next()){var e=Xy(d.value,"GROUP-ID");if(d=a.K.get(e))if(e=a.L.get(e)){e=u(e);for(var f=e.next();!f.done;f=e.next())f=f.value,f.stream.codecs=d,f.stream.mimeType=jA(vc,d)||kA(vc),lA(f.stream)}}return b.filter(function(g){return g})}
function lA(a){var b=new Set([gf(a.mimeType,a.codecs)]);a.segmentIndex&&a.segmentIndex.Nb(function(c){c.mimeType&&b.add(gf(c.mimeType,a.codecs))});a.fullMimeTypes=b}
function Xz(a,b,c){var d,e;return Q(function(f){if(f.g==1)return d=b.map(function(g){var h,k,l;return Q(function(m){if(m.g==1){if(h=a.g.disableThumbnails)return m.return(null);sa(m,2);return E(m,mA(a,g),4)}if(m.g!=2)return k=m.h,m.return(k.stream);l=va(m);if(a.g.hls.ignoreImageStreamFailures)return m.return(null);throw l;})}).concat(c.map(function(g){if(a.g.disableThumbnails)return null;try{var h=AA(a,g);return h.stream.type!=="image"?null:h.stream}catch(k){if(a.g.hls.ignoreImageStreamFailures)return null;
throw k;}})),E(f,Promise.all(d),2);e=f.h;return f.return(e.filter(function(g){return g}))})}function BA(a,b,c){b=b.filter(function(h){var k=Wy(h,"URI")||"";h=Wy(h,"TYPE");return h!="SUBTITLES"&&(k!=""||h=="AUDIO")});var d={};b=u(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=Uy(e,!a.j);d[f]?d[f].push(e):d[f]=[e]}for(var g in d)iA(a,d[g],c,!1)}function Uz(a,b){return b.map(function(c){c=AA(a,c);return c.stream.type!=="video"?null:c.stream}).filter(function(c){return c})}
function Vz(a,b,c,d,e,f,g){var h,k,l,m,n,q,r,t,v,w,z,y,A,C,F,D,B,G,K,I,J,L,N,P,O,M,R,V,xa,ba,Oa,Ha,Ia,Fa,wa,Ca;return Q(function(Ma){switch(Ma.g){case 1:h=[];k=new Set;if(a.g.ignoreDrmInfo||!(c.length>0)){Ma.B(2);break}l=u(c);m=l.next();case 3:if(m.done){Ma.B(2);break}n=m.value;q=Xy(n,"METHOD");r=Wy(n,"KEYFORMAT")||"identity";t=null;if(q=="NONE"){Ma.B(4);break}if(CA(q)){v=dz(e(),Xy(n,"URI"),f);w=v.sort().join("");a.O.has(w)||(z=jh(v,a.g.retryParameters),y=eA(a,z,6).promise,a.O.set(w,y));Ma.B(4);break}if(r==
"identity")return E(Ma,DA(a,n,"",e,null,f),12);A=a.Gc.get(r);if(!A){C=null;Ma.B(10);break}return E(Ma,A(n,"",null),11);case 11:C=Ma.h;case 10:t=C;Ma.B(6);break;case 12:t=Ma.h;case 6:if(t){if(t.keyIds)for(F=u(t.keyIds),D=F.next();!D.done;D=F.next())B=D.value,k.add(B);h.push(t)}case 4:m=l.next();Ma.B(3);break;case 2:G={};K=u(b);for(I=K.next();!I.done;I=K.next())J=I.value,L=Uy(J,!a.j),G[L]?G[L].push(J):G[L]=[J];N=[];for(P in G)O=G[P],M=O[0],R=Wy(M,"FRAME-RATE"),V=Number(Xy(M,"BANDWIDTH"))||Number(Wy(M,
"AVERAGE-BANDWIDTH")),xa=Wy(M,"RESOLUTION"),ba=u(xa?xa.split("x"):[null,null]),Oa=ba.next().value,Ha=ba.next().value,Ia=Wy(M,"VIDEO-RANGE"),(Fa=Wy(M,"REQ-VIDEO-LAYOUT"))&&Fa.includes(",")&&(wa=Fa.split(",").filter(function(La){return La=="CH-STEREO"||La=="CH-MONO"}),Fa=wa[0]),Fa=Fa||"CH-MONO",Ca=EA(a,O,d),N.push.apply(N,x(FA(a,Ca.audio,Ca.video,V,Oa,Ha,R,Ia,Fa,h,k,g)));return Ma.return(N.filter(function(La){return La!=null}))}})}
function EA(a,b,c){for(var d={audio:[],video:[]},e=new Map,f=[],g=!1,h=!1,k=u(b),l=k.next();!l.done;l=k.next()){var m=l.value;l=Wy(m,"AUDIO");var n=Wy(m,"VIDEO"),q=l||n;q&&(f.includes(q)||f.push(q),(m=Wy(m,"PATHWAY-ID"))&&e.set(q,m),l?g=!0:n&&(h=!0))}f.length&&c.length&&(c=c.filter(function(t){return f.includes(Xy(t,"GROUP-ID"))}),BA(a,c,e));c=(e=f.sort().join(","))&&a.L.has(e)?a.L.get(e):[];g?d.audio.push.apply(d.audio,x(c)):h&&d.video.push.apply(d.video,x(c));h=!1;var r=b.map(function(t){return Xy(t,
"URI")});g=d.audio.find(function(t){return t&&t.S().find(function(v){return r.includes(v)})});c=hA(a,b[0]);k=tc("video",c);(l=tc("audio",c))&&!k?(g="audio",h=d.audio.length>0&&!d.audio.some(function(t){return t.stream.isAudioMuxedInVideo})):!d.audio.length&&!d.video.length&&l&&k?(g="video",c=[[k,l].join()]):d.audio.length&&g?(g="audio",h=!0):g=d.video.length&&!d.audio.length?"audio":"video";h||(b=GA(a,b,c,g),e&&a.g.enableAudioGroups&&(b.stream.groupId=e),b.stream.type=="audio"&&g==="audio"&&d.audio.some(function(t){return t.stream.isAudioMuxedInVideo})&&
(a=d.audio[0].stream,b.stream.language=a.language,b.stream.channelsCount=a.channelsCount,b.stream.label=a.label,b.stream.audioSamplingRate=a.audioSamplingRate,b.stream.originalId=a.originalId,b.stream.originalLanguage=a.originalLanguage),d[b.stream.type]=[b]);return d}
function hA(a,b){b=Wy(b,"CODECS")||"";a.Z=b.length>0;a.Z||a.g.hls.disableCodecGuessing||(b=[],a.g.disableVideo||b.push(a.g.hls.defaultVideoCodec),a.g.disableAudio||b.push(a.g.hls.defaultAudioCodec),b=b.join(","));return Tm(b.split(/\s*,\s*/))}function HA(a){return(a=Wy(a,"CHANNELS"))?parseInt(a.split("/")[0],10):null}function IA(a){return(a=Wy(a,"SAMPLE-RATE"))?parseInt(a,10):null}
function JA(a){a=Wy(a,"CHANNELS");if(!a)return!1;a=a.split("/");return a.length!=2?!1:a[1]==="JOC"||a[1].includes("ATMOS")}function KA(a){a=Xy(a,"TYPE").toLowerCase();a=="subtitles"&&(a=vc);return a}
function FA(a,b,c,d,e,f,g,h,k,l,m,n){for(var q=u(c),r=q.next();!r.done;r=q.next())LA(r.value.stream,e,f,g,h,k,null);e=a.g.disableVideo;if(!c.length||e)c=[null];e&&(b=b.filter(function(z){return!z.stream.isAudioMuxedInVideo}));e=a.g.disableAudio;if(!b.length||e)b=[null];e=[];b=u(b);for(f=b.next();!f.done;f=b.next())for(f=f.value,g=u(c),h=g.next();!h.done;h=g.next()){var t=h.value;if(h=f?f.stream:null)h.drmInfos=l,h.keyIds=m;if(k=t?t.stream:null)k.drmInfos=l,k.keyIds=m,a.g.disableIFrames||tg(k,n);k&&
!h&&(k.bandwidth=d);!k&&h&&(h.bandwidth=d);q=f?f.stream.drmInfos:null;r=t?t.stream.drmInfos:null;t=t?t.S().sort().join(","):"";var v=f?f.S().sort().join(","):"",w=[];h&&h.codecs&&w.push(h.codecs);k&&k.codecs&&w.push(k.codecs);t=[t,v,w.sort()].join("-");h&&k&&!Bg(q,r)||a.jb.has(t)||(h={id:a.G++,language:h?h.language:"und",disabledUntilTime:0,primary:!!h&&h.primary||!!k&&k.primary,audio:h,video:k,bandwidth:d,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},e.push(h),a.jb.add(t))}return e}
function Tz(a,b){b=az(b,"CLOSED-CAPTIONS");a.P=b.length==0;b=u(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Wy(d,"LANGUAGE");c=Bc(e||"und");e||(e=Wy(d,"NAME"))&&(c=e);e=Xy(d,"GROUP-ID");d=Xy(d,"INSTREAM-ID").replace("SERVICE","svc");a.J.get(e)||a.J.set(e,new Map);a.J.get(e).set(d,c)}}
function iA(a,b,c,d){d=d===void 0?!0:d;for(var e=[],f=[],g=new Map,h=u(b),k=h.next(),l={};!k.done;l={fj:void 0},k=h.next())k=k.value,l.fj=++a.G,l=function(v){return function(){return"shaka://hls-muxed"+v.fj}}(l),l=d?Xy(k,"URI"):Wy(k,"URI")||l(),k=Xy(k,"GROUP-ID"),e.push(l),f.push(k),g.set(k,l);d=f.sort().join(",");k=b[0];b="";h=KA(k);if(h==vc)b=Wy(k,"CODECS")||"";else for(f=u(f),l=f.next();!l.done;l=f.next())if(l=l.value,a.K.has(l)){b=a.K.get(l);break}f=e.sort().join(",");h=="audio"&&d&&(f+=d);if(a.i.has(f))return a.i.get(f);
l=a.G++;if(a.j){g=u(g);for(var m=g.next();!m.done;m=g.next()){var n=u(m.value);m=n.next().value;n=n.next().value;(m=c.get(m))&&Yw(a.j,l,m,n)}}c=Wy(k,"LANGUAGE");g=Wy(k,"NAME");m=Wy(k,"DEFAULT")=="YES";n=h=="audio"?HA(k):null;var q=h=="audio"?JA(k):!1,r=Wy(k,"CHARACTERISTICS"),t=Wy(k,"FORCED")=="YES";k=h=="audio"?IA(k):null;e=MA(a,l,e,b,h,c,m,g,n,null,r,t,k,q);e.stream&&a.g.enableAudioGroups&&(e.stream.groupId=d);a.L.has(d)?a.L.get(d).push(e):a.L.set(d,[e]);a.i.set(f,e);return e}
function mA(a,b){var c,d,e,f,g,h,k,l,m,n;return Q(function(q){if(q.g==1){c=Xy(b,"URI");d=Wy(b,"CODECS","jpeg")||"";if(a.i.has(c))return q.return(a.i.get(c));e=Wy(b,"LANGUAGE");f=Wy(b,"NAME");g=Wy(b,"CHARACTERISTICS");h=MA(a,a.G++,[c],d,"image",e,!1,f,null,null,g,!1,null,!1);return(k=Wy(b,"RESOLUTION"))?E(q,h.stream.createSegmentIndex(),3):q.B(2)}if(q.g!=2){l=jg(h.stream.segmentIndex);if(m=l.tilesLayout)h.stream.width=Number(k.split("x")[0])*Number(m.split("x")[0]),h.stream.height=Number(k.split("x")[1])*
Number(m.split("x")[1]);h.stream.closeSegmentIndex()}if(n=Wy(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.i.set(c,h);return q.return(h)})}
function AA(a,b){var c="video",d=Xy(b,"URI"),e=Wy(b,"CODECS")||"";e=="mjpg"&&(c="image");if(a.i.has(d))return a.i.get(d);var f=Wy(b,"LANGUAGE"),g=Wy(b,"NAME"),h=Wy(b,"CHARACTERISTICS");c=MA(a,a.G++,[d],e,c,f,!1,g,null,null,h,!1,null,!1);e=Wy(b,"RESOLUTION");f=u(e?e.split("x"):[null,null]);e=f.next().value;f=f.next().value;c.stream.width=Number(e)||void 0;c.stream.height=Number(f)||void 0;if(b=Wy(b,"BANDWIDTH"))c.stream.bandwidth=Number(b);a.i.set(d,c);return c}
function GA(a,b,c,d){for(var e=a.G++,f=[],g=u(b),h=g.next();!h.done;h=g.next()){var k=h.value;h=Xy(k,"URI");k=Wy(k,"PATHWAY-ID");a.j&&k&&Yw(a.j,e,k,h);f.push(h)}g=f.sort().join(",")+c.sort().join(",");if(a.i.has(g))return a.i.get(g);h=f.join(",");a:{b=Wy(b[0],"CLOSED-CAPTIONS");if(d=="video"){if(a.g.disableText){a.P=!1;b=null;break a}if(b){if(b!="NONE"){b=a.J.get(b);break a}a.P=!1}else if(!b&&a.J.size)for(b=u(a.J.keys()),b=b.next();!b.done;b=b.next()){b=a.J.get(b.value);break a}}b=null}c=sc(d,c);
d=MA(a,e,f,c,d,null,!1,h,null,b,null,!1,null,!1);a.i.set(g,d);return d}
function MA(a,b,c,d,e,f,g,h,k,l,m,n,q,r){function t(C){var F,D,B,G,K,I,J,L,N,P,O,M,R,V,xa,ba,Oa,Ha,Ia,Fa;return Q(function(wa){switch(wa.g){case 1:return F=xc,sa(wa,2),E(wa,C.promise,4);case 4:D=wa.h;if(C.aborted)return wa.return();B=D.uri;B!=D.originalUri&&(G=z.S(),G.includes(B)||z.ag.push(B));K=hz(a.Na,D.data);if(K.type!=1)throw new U(2,4,4017);I=$y(K.ka,"EXT-X-DEFINE");J=Ez(a,I,B);L=!1;(!a.Z&&a.g.hls.disableCodecGuessing||a.P&&e==F.Ha&&!a.g.hls.disableClosedCaptionsDetection)&&K.segments.length>
0&&(a.P=!1,L=!0);N=!a.Z&&a.g.hls.disableCodecGuessing;P=yz(a);return E(wa,Oz(a,0,J,K,v,d,e,f,g,h,k,l,m,n,q,r,void 0,L,N),5);case 5:O=wa.h;if(C.aborted)return wa.return();M=O.stream;Yz(a,K);yz(a)&&!P&&Zz(a,K);z.nd=O.nd;z.Zc=O.Zc;z.pf=O.pf;z.nf=O.nf;z.se=O.se;z.Nf=O.Nf;z.ac=O.ac;z.bc=O.bc;w.segmentIndex=M.segmentIndex;w.encrypted=M.encrypted;w.drmInfos=M.drmInfos;w.keyIds=M.keyIds;w.mimeType=M.mimeType;w.bandwidth=w.bandwidth||M.bandwidth;w.codecs=w.codecs||M.codecs;w.closedCaptions=w.closedCaptions||
M.closedCaptions;w.width=w.width||M.width;w.height=w.height||M.height;w.hdr=w.hdr||M.hdr;w.colorGamut=w.colorGamut||M.colorGamut;w.frameRate=w.frameRate||M.frameRate;w.language=="und"&&M.language!="und"&&(w.language=M.language);w.language=w.language||M.language;w.channelsCount=w.channelsCount||M.channelsCount;w.audioSamplingRate=w.audioSamplingRate||M.audioSamplingRate;lA(w);w.drmInfos.length&&a.h.newDrmInfo(w);R=!1;if(!l&&w.closedCaptions||l&&w.closedCaptions&&l.size!=w.closedCaptions.size)R=!0;
a.m&&R&&a.h.makeTextStreamsForClosedCaptions(a.m);e==F.Va&&(V=jg(M.segmentIndex))&&V.ia&&(w.mimeType="application/mp4",lA(w));xa=Bm(w);w.segmentIndex.Nb(function(Ca){Ca.ia&&(Ca.ia.Pd=xa)});NA(a)&&(a.Kc?$z(a,[z]):(a.Kc=!0,ba=Array.from(a.i.values()),Oa=ba.filter(function(Ca){return Ca.stream.segmentIndex}),$z(a,Oa),Cz(a),Ha=a.u,Ha>0&&a.F.Y(Ha)));Jz(a,K.ka,w.type,J,v);a.m&&(a.m.startTime=a.A);ua(wa,0);break;case 2:Ia=va(wa);w.closeSegmentIndex();if(Ia.code===7001)return wa.return();Fa=a.h.disableStream(w);
if(!Fa)throw Ia;H(wa)}})}function v(){return a.j&&c.length>1?Zw(a.j,b):z.ag.concat(ez([a.H],c,a.C))}var w=OA(a,d,e,f,g,h,k,l,m,n,q,r);c.some(function(C){return C.startsWith("shaka://hls-muxed")})&&(w.isAudioMuxedInVideo=!0,w.mimeType="video/mp2t",lA(w));var z={stream:w,type:e,ag:[],nd:0,Zc:0,Nf:new Map,pf:!1,nf:!1,se:!1,Xg:-1,ac:-1,bc:-1,S:v},y=null,A;w.createSegmentIndex=function(){if(y)return y;if(w.isAudioMuxedInVideo)return w.segmentIndex=new mm([]),Promise.resolve();A=wz(a,z.S(),!0);return y=
new Promise(function(C){C(t(A))})};w.closeSegmentIndex=function(){y&&!w.segmentIndex&&A.abort();w.segmentIndex&&(w.segmentIndex.release(),w.segmentIndex=null);y=null};return z}function gA(a){var b=Infinity;a=u(a.i.values());for(var c=a.next();!c.done;c=a.next())c=c.value,c.stream.segmentIndex&&c.stream.type!="text"&&!c.stream.isAudioMuxedInVideo&&(b=Math.min(b,c.Zc));return b}
function Az(a,b){var c=[];b=u(b);for(var d=b.next();!d.done;d=b.next())d=d.value,d.segmentIndex&&d.segmentIndex.Nb(function(e){c.push(e)});a.l.De(c)}
function $z(a,b){if(!yz(a))for(var c=gA(a),d=u(b),e=d.next();!e.done;e=d.next())e.value.stream.segmentIndex.Hd(0,c);Az(a,b.map(function(f){return f.stream}));d=Array.from(a.i.values()).filter(function(f){return f.stream.segmentIndex});c=d.some(function(f){return f.stream.type=="audio"});e=d.some(function(f){return f.stream.type=="video"});d=yz(a)&&!a.ib;c=!yz(a)&&a.ib&&!(c&&e);a.g.hls.ignoreManifestProgramDateTime||d||c?Kz(a,b,d):(Nz(a,b),a.g.hls.ignoreManifestProgramDateTimeForTypes.length>0&&Kz(a,
b))}function Lz(a,b){return a.g.hls.ignoreManifestProgramDateTime?!0:a.g.hls.ignoreManifestProgramDateTimeForTypes.includes(b)}function NA(a){if(!a.m)return!1;var b=[],c=[];a=u(a.m.variants);for(var d=a.next();!d.done;d=a.next())d=d.value,d.video&&b.push(d.video),d.audio&&c.push(d.audio);return b.length>0&&!b.some(function(e){return e.segmentIndex})||c.length>0&&!c.some(function(e){return e.segmentIndex})?!1:!0}
function Oz(a,b,c,d,e,f,g,h,k,l,m,n,q,r,t,v,w,z,y){z=z===void 0?!0:z;y=y===void 0?!0:y;var A,C,F,D,B,G,K,I,J,L,N,P,O,M,R,V,xa,ba,Oa,Ha,Ia,Fa,wa,Ca,Ma,La,Ba,eb,hb;return Q(function(pb){switch(pb.g){case 1:A=d.segments||[];C=A.every(function(Ua){return bz(Ua.ka,"EXT-X-GAP")?!0:!1});if(!A.length||C)throw new U(2,4,4053);PA(a,d);yz(a)&&Iz(a,d);F=yz(a)?a.D.get(g):new Map;D=Gz(a,d,F,c,e,g);B=D.segments;G=D.bandwidth;N=L=J=I=K=null;if(!(B.length>0&&z)){pb.B(2);break}return E(pb,aA(a,B),3);case 3:P=pb.h,
g!=P.type&&yz(a)&&(a.D.set(P.type,a.D.get(g)),a.D.set(g,new Map)),g=P.type,h=P.language,m=P.channelCount,t=P.sampleRate,a.g.disableText||(n=P.closedCaptions),I=P.height,K=P.width,J=P.Pe,L=P.colorGamut,N=P.frameRate,y&&(w=P.mimeType,f=P.codecs);case 2:if(w){pb.B(4);break}return E(pb,QA(a,g,f,B),5);case 5:w=pb.h,g!=vc||f||w!="application/mp4"||!B[0]||B[0].ia||(w="text/vtt");case 4:return E(pb,Fz(a,d,w,e,c),6);case 6:O=pb.h;M=O.drmInfos;R=O.keyIds;V=O.encrypted;xa=O.Fi;if(V&&!M.length&&!xa)throw new U(2,
4,4026);ba=OA(a,f,g,h,k,l,m,n,q,r,t,v);ba.encrypted=V&&!xa;ba.drmInfos=M;ba.keyIds=R;ba.mimeType=w;G&&(ba.bandwidth=G);lA(ba);g=="video"&&(K||I||J||L)&&LA(ba,K,I,N,J,null,L);yz(a)&&Iz(a,d);Oa=B[0].startTime;Ha=B[B.length-1];Ia=Ha.endTime;Fa=new mm(B);ba.segmentIndex=Fa;Ca=(wa=bz(d.ka,"EXT-X-SERVER-CONTROL"))?Vy(wa,"CAN-SKIP-UNTIL")!=null:!1;Ma=wa?Vy(wa,"CAN-BLOCK-RELOAD")!=null:!1;La=cz(d.ka,"EXT-X-MEDIA-SEQUENCE",0);Ba=Hz(La,B);eb=Ba.ac;hb=Ba.bc;return pb.return({stream:ba,type:g,ag:[],S:e,nd:Oa,
Zc:Ia,pf:Ca,nf:Ma,se:!1,Xg:-1,ac:eb,bc:hb,Nf:F})}})}function Hz(a,b){a=a+b.length-1;var c=-1;if(!b.length)return a++,{ac:a,bc:c};b=b[b.length-1];var d=b.g;if(!b.g.length)return a++,b.u&&(c=0),{ac:a,bc:c};c=d.length-1;d[d.length-1].isPreload()||(a++,c=0);return{ac:a,bc:c}}
function OA(a,b,c,d,e,f,g,h,k,l,m,n){var q=jA(c,b)||kA(c),r=[];if(k){k=u(k.split(","));for(var t=k.next();!t.done;t=k.next())r.push(t.value)}t=void 0;k=null;c==vc?t=r.includes("public.accessibility.transcribes-spoken-dialog")&&r.includes("public.accessibility.describes-music-and-sound")?"caption":"subtitle":r.includes("public.accessibility.describes-video")&&(k="visually impaired");r.length||t!=="subtitle"||r.push("subtitle");t=null;c!="video"&&(t=f);a={id:a.G++,originalId:f,groupId:null,createSegmentIndex:function(){return Promise.resolve()},
segmentIndex:null,mimeType:q,codecs:b,kind:c==vc?"subtitle":void 0,encrypted:!1,drmInfos:[],keyIds:new Set,language:Bc(d||"und"),originalLanguage:d,label:t,type:c,primary:e,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:r,forced:l,channelsCount:g,audioSamplingRate:m,spatialAudio:n,closedCaptions:h,hdr:void 0,colorGamut:void 0,videoLayout:void 0,tilesLayout:void 0,accessibilityPurpose:k,external:!1,
fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1,baseOriginalId:null};lA(a);return a}
function Fz(a,b,c,d,e){var f,g,h,k,l,m,n,q,r,t,v,w,z,y,A,C,F,D,B,G,K,I,J,L,N,P,O,M,R;return Q(function(V){switch(V.g){case 1:f=new Map;if(!a.g.ignoreDrmInfo&&b.segments)for(g=u(b.segments),h=g.next();!h.done;h=g.next())if(k=h.value,l=$y(k.ka,"EXT-X-KEY"),m=null,l.length)for(m=RA(a,b,k.ka,d,e),n=u(l),q=n.next();!q.done;q=n.next())r=q.value,f.set(r,m);v=t=!1;w=[];z=new Set;y=u(f);A=y.next();case 2:if(A.done){V.B(4);break}C=A.value;F=u(C);D=F.next().value;B=F.next().value;G=D;K=B;I=Xy(G,"METHOD");if(I==
"NONE"){V.B(3);break}t=!0;J=Wy(G,"KEYFORMAT")||"identity";L=null;if(CA(I)){v=!0;V.B(3);break}if(J=="identity")return E(V,DA(a,G,c,d,K,e),11);N=a.Gc.get(J);if(!N){P=null;V.B(9);break}return E(V,N(G,c,K),10);case 10:P=V.h;case 9:L=P;V.B(6);break;case 11:L=V.h;case 6:if(L){if(L.keyIds)for(O=u(L.keyIds),M=O.next();!M.done;M=O.next())R=M.value,z.add(R);w.push(L)}case 3:A=y.next();V.B(2);break;case 4:return V.return({drmInfos:w,keyIds:z,encrypted:t,Fi:v})}})}
function SA(a,b,c,d,e){if(!window.crypto||!window.crypto.subtle)throw bb("Web Crypto API is not available to decrypt AES. (Web Crypto only exists in secure origins like https)"),new U(2,4,4042);var f=0,g=Wy(b,"IV","");if(g){var h=mc(g.substr(2));if(h.byteLength!=16)throw new U(2,4,4048);}else f=cz(c.ka,"EXT-X-MEDIA-SEQUENCE",0);var k=dz(d(),Xy(b,"URI"),e),l=k.sort().join("");c=b.toString()+"-"+f+"-"+l;if(!a.oa.has(c)){var m={bitsKey:128,blockCipherMode:"CBC",iv:h,firstMediaSequenceNumber:f};switch(Xy(b,
"METHOD")){case "AES-256":m.bitsKey=256;break;case "AES-256-CTR":m.bitsKey=256,m.blockCipherMode="CTR"}m.fetchKey=function(){var n,q,r,t;return Q(function(v){if(v.g==1)return a.O.has(l)||(n=jh(k,a.g.retryParameters),q=eA(a,n,6).promise,a.O.set(l,q)),E(v,a.O.get(l),2);if(v.g!=3){r=v.h;if(!r.data||r.data.byteLength!=m.bitsKey/8)throw new U(2,4,4049);t={name:m.blockCipherMode=="CTR"?"AES-CTR":"AES-CBC",length:m.bitsKey};return E(v,window.crypto.subtle.importKey("raw",r.data,t,!0,["decrypt"]),3)}m.cryptoKey=
v.h;m.fetchKey=void 0;H(v)})};a.oa.set(c,m)}return a.oa.get(c)}function Yz(a,b){a.A==null&&(b=bz(b.ka,"EXT-X-START"))&&(a.A=Number(Xy(b,"TIME-OFFSET")))}function PA(a,b){var c=bz(b.ka,"EXT-X-PLAYLIST-TYPE");b=bz(b.ka,"EXT-X-ENDLIST");b=c&&c.value=="VOD"||b;c=c&&c.value=="EVENT"&&!b;c=!b&&!c;b?Bz(a,vz):c?Bz(a,fA):Bz(a,TA)}
function Iz(a,b){var c=Infinity,d=b.segments;if(d.length)for(var e=d.length-1;e>=0;){var f=bz(d[e].ka,"EXTINF");if(f){c=Number(f.value.split(",")[0]);break}e--}d=bz(b.ka,"EXT-X-TARGETDURATION");if(!d)throw new U(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);if(e=bz(b.ka,"EXT-X-PART-INF"))a.R=Number(Xy(e,"PART-TARGET"));b=bz(b.ka,"EXT-X-SERVER-CONTROL");a.ea&&a.R?(a.u=a.Jc?a.R*5<=c?Math.min(a.R,a.u):Math.min(c,a.u):Math.min(a.R,a.u),a.hb=b?Number(Xy(b,"PART-HOLD-BACK")):0):(a.u=Math.min(c,a.u),
c=b?Vy(b,"HOLD-BACK"):null,a.La=c?Number(c.value):0);a.fb=Math.max(d,a.fb)}function Zz(a,b){var c=0;if(a.g.defaultPresentationDelay)c=a.g.defaultPresentationDelay;else if(a.hb)c=a.hb;else if(a.La)c=a.La;else for(var d=b.segments.length,e=d-Math.min(d,a.g.hls.liveSegmentsDelay);e<d;e++){var f=bz(b.segments[e].ka,"EXTINF");c=f?c+Number(f.value.split(",")[0]):c+a.fb}a.A&&a.A<0&&(c=Math.min(-a.A,c),a.A+=c);a.l.Tj(0);a.l.ci(c);a.l.td(!1)}
function RA(a,b,c,d,e){var f=bz(c,"EXT-X-MAP");if(!f)return null;var g=Xy(f,"URI"),h=dz(d(),g,e);g=[h.toString(),Wy(f,"BYTERANGE","")].join("-");if(!a.ya.has(g)){var k=void 0,l=null,m=!1;c=u(c);for(var n=c.next();!n.done;n=c.next())n=n.value,n.name=="EXT-X-KEY"?(m=Xy(n,"METHOD"),CA(m)&&n.id<f.id?(m=!1,k=SA(a,n,b,d,e)):m=m!="NONE"):n.name=="EXT-X-BYTERANGE"&&n.id<f.id&&(l=n);b=UA(h,f,l,k,m);a.ya.set(g,b)}return a.ya.get(g)}
function UA(a,b,c,d,e){var f=0,g=null;b=Wy(b,"BYTERANGE");!b&&c&&(b=c.value);b&&(f=b.split("@"),g=Number(f[0]),f=Number(f[1]),g=f+g-1,d&&(c=g+1-f,c%16&&(g+=16-c%16)));return new Hj(function(){return a},f,g,null,null,null,d,e)}
function VA(a,b,c,d,e,f,g,h,k,l){var m=d.ka,n=bz(m,"EXTINF"),q=0,r=0,t=null;d.Hc.length&&(a.m.isLowLatency=!0);var v=null;if(c&&c.h)v=c.h+c.endTime-c.startTime;else if(!a.g.hls.ignoreManifestProgramDateTime){var w=bz(m,"EXT-X-PROGRAM-DATE-TIME");w&&w.value&&(v=ee(w.value),a.ib=!0)}var z=Kj;bz(m,"EXT-X-GAP")&&(a.m.gapCount++,z=2);if(!n){if(d.Hc.length==0)throw new U(2,4,4024,"EXTINF");if(!a.ea)return null}var y=[];w=!1;var A=null,C=!1,F=!1;if(a.ea&&d.Hc.length){q=b&&window.ReadableStream&&a.g.hls.allowLowLatencyByteRangeOptimization;
for(var D=v,B={},G=0;G<d.Hc.length;B={wg:void 0,Fe:void 0},G++){var K=d.Hc[G],I=G==0?c:y[y.length-1],J=G==0?e:I.endTime,L=Number(Wy(K,"DURATION"))||a.R;if(L){var N=J+L,P=0,O=null;K.name=="EXT-X-PRELOAD-HINT"?(P=(P=Wy(K,"BYTERANGE-START"))?Number(P):0,(I=Wy(K,"BYTERANGE-LENGTH"))?O=P+Number(I)-1:P&&(O=Number.MAX_SAFE_INTEGER)):(P=Wy(K,"BYTERANGE"),O=u(WA(I,P)),P=O.next().value,O=O.next().value);B.Fe=Wy(K,"URI");if(B.Fe){I=Kj;Wy(K,"GAP")=="YES"&&(a.m.gapCount++,I=2,C=!0);B.wg=null;var M=function(V){return function(){V.wg==
null&&(V.wg=dz(h(),V.Fe,f));return V.wg}}(B);q&&P>=0&&O!=null&&(A=M,w=!0);J=new Jj(J,N,M,P,O,b,0,0,Infinity,[],"",null,D,I,l);K.name=="EXT-X-PRELOAD-HINT"&&(J.Jh(),F=!0);Wy(K,"INDEPENDENT")!="YES"&&G>0&&J.Od();K=k;K||(y.length&&y[0].mimeType?K=y[0].mimeType:B.Fe&&(B=cp(B.Fe),K=XA.get(g).get(B)||null));K&&(J.mimeType=K,YA.has(K)&&(J.ia=null));y.push(J);D&&(D+=L)}}}}if(n){n=Number(n.value.split(",")[0]);if(n==0)return null;q=e+n}else if(y.length)q=y[y.length-1].endTime;else return null;w&&(C||y[0].startByte!=
0?(w=!1,A=null):y=[]);(n=bz(m,"EXT-X-BYTERANGE"))?(t=u(WA(c,n.value)),r=t.next().value,t=t.next().value):y.length&&(r=y[0].startByte,t=y[y.length-1].endByte);c="";n=null;g=="image"&&(c="1x1",g=bz(m,"EXT-X-TILES"))&&(c=Xy(g,"LAYOUT"),(g=Wy(g,"DURATION"))&&(n=Number(g)));var R=null;b=new Jj(e,q,function(){if(A)return A();R==null&&(R=dz(h(),d.g,f));return R||[]},r,t,b,0,0,Infinity,y,c,n,v,z,l,y.length>0&&!!d.g);k&&(b.mimeType=k,YA.has(k)&&(b.ia=null));w&&(a.Jc=!0,b.nj(),F&&b.Jh());return b}
function WA(a,b){var c=0,d=null;b&&(c=b.split("@"),b=Number(c[0]),c=c[1]?Number(c[1]):a.endByte+1,d=c+b-1);return[c,d]}
function Jz(a,b,c,d,e){if(c=="video"||c=="audio"){var f=a.l.m;if(f&&!Lz(a,c))for(b=$y(b,"EXT-X-DATERANGE"),b=b.filter(function(I){return Vy(I,"START-DATE")!=null}).sort(function(I,J){I=Xy(I,"START-DATE");J=Xy(J,"START-DATE");return I<J?-1:I>J?1:0}),c=0;c<b.length;c++){var g=b[c];try{var h=Xy(g,"START-DATE"),k=ee(h);if(!isNaN(k)){var l=Math.max(0,k-f),m=null,n=Wy(g,"END-DATE");if(n){var q=ee(n);if(!isNaN(q)&&(m=q-f,m<0))continue}if(m==null){var r=Wy(g,"DURATION")||Wy(g,"PLANNED-DURATION");if(r){var t=
parseFloat(r);isNaN(t)||(m=l+t);if(k-f+t<0)continue}}var v=Wy(g,"CLASS")||"com.apple.quicktime.HLS",w=Wy(g,"END-ON-NEXT")=="YES";if(m==null&&w){for(var z=c+1;z<b.length;z++){var y=Wy(b[z],"CLASS")||"com.apple.quicktime.HLS";if(v==y){var A=Xy(b[z],"START-DATE"),C=ee(A);if(!isNaN(C)&&C&&C>k){m=Math.max(0,C-f);break}}}if(m==null)continue}z=["CLASS","START-DATE","END-DATE","DURATION","END-ON-NEXT"];for(var F=[],D=u(g.attributes),B=D.next();!B.done;B=D.next()){var G=B.value;if(!z.includes(G.name)){var K=
fz(G.value,d);if(G.name=="X-ASSET-URI"||G.name=="X-ASSET-LIST")K=dz(e(),G.value,d)[0];F.push({key:G.name,description:"",data:K,mimeType:null,pictureType:null})}}if(F.length>1)a.h.onMetadata(v,l,m,F)}}catch(I){}}}}
function Gz(a,b,c,d,e,f){function g(I){I=cp(I);if(!I)return null;var J=XA.get(f).get(I);J||(J=cA.get(I));return J}var h=b.segments,k=null,l=null,m=null,n=null,q=void 0,r=cz(b.ka,"EXT-X-DISCONTINUITY-SEQUENCE",-1),t=cz(b.ka,"EXT-X-MEDIA-SEQUENCE",0),v=bz(b.ka,"EXT-X-SKIP"),w=v?Number(Wy(v,"SKIPPED-SEGMENTS")):0,z=t+w,y=0;yz(a)&&c.has(z)&&(y=c.get(z));y===0&&a.Fa==fA&&c.size>0&&!c.has(z)&&a.l.i!=null&&(y=a.l.Pb());var A=[],C=null;v=[];for(var F=0;F<h.length;F++){var D=h[F];(z=bz(D.ka,"EXT-X-MAP"))&&
z.id!==l&&(k=RA(a,b,D.ka,e,d),l=z.id);z=D.g;var B="";z&&(B=cp(z));B!==n&&(m=g(z),n=B);B=F==0?y:C.endTime;z=t+w+F;bz(D.ka,"EXT-X-DISCONTINUITY")&&(r++,C&&C.ia&&(C.ia.g=B));for(var G=u(D.ka),K=G.next();!K.done;K=G.next())K=K.value,K.name=="EXT-X-KEY"&&(CA(Xy(K,"METHOD"))?q=SA(a,K,b,e,d):q=void 0);c.set(z,B);if(B=VA(a,k,C,D,B,d,f,e,m,q)){if(C=cz(D.ka,"EXT-X-BITRATE"))v.push({bitrate:C,duration:B.endTime-B.startTime}),B.bandwidth=C;else if(B.endByte){if(D=Lj(B))C=B.endTime-B.startTime,D=D*8/C/1E3,v.push({bitrate:D,
duration:C}),B.bandwidth=D}else v.length&&(C=v.pop(),C.duration+=B.endTime-B.startTime,v.push(C),B.bandwidth=C.bitrate);if(B.bandwidth)for(C=u(B.g),D=C.next();!D.done;D=C.next())D.value.bandwidth=B.bandwidth;C=B;B.i=r;Lz(a,f)&&a.M!=null&&z<a.M||A.push(B)}}b=void 0;v.length&&(b=v.reduce(function(I,J){return I+J.duration},0),b=Math.round(v.reduce(function(I,J){return I+J.bitrate*J.duration},0)/b*1E3));if(v=A.some(function(I){return I.h!=null}))for(c={},d=0;d<A.length;c={uf:void 0,tf:void 0,kf:void 0,
qd:void 0,jf:void 0},d++)if(c.qd=A[d],c.qd.h==null)for(c.tf=0,c.uf=d,e=function(I){return function(){var J=A[I.uf];if(J){if(J.h!=null)return J.h+I.tf;I.tf-=J.endTime-J.startTime;I.uf+=1}return null}}(c),c.jf=0,c.kf=d,h=function(I){return function(){var J=A[I.kf];if(J){J!=I.qd&&(I.jf+=J.endTime-J.startTime);if(J.h!=null)return J.h+I.jf;--I.kf}return null}}(c);c.qd.h==null;)c.qd.h=h(),c.qd.h==null&&(c.qd.h=e());if(v)for(c=u(A),d=c.next();!d.done;d=c.next())for(e=d.value,d=e.h,e=u(e.g),h=e.next();!h.done;h=
e.next())h=h.value,h.h=d,d+=h.endTime-h.startTime;c=a.aa;if(v&&c!=Infinity&&!Lz(a,f))for(a=u(A),v=a.next();!v.done;v=a.next())v.value.pi(c);return{segments:A,bandwidth:b}}function jA(a,b){if(a==vc){if(b=="vtt"||b=="wvtt")return"text/vtt";if(b&&b!=="")return"application/mp4"}return a!="image"||b&&b!="jpeg"?a=="audio"&&b=="mp4a.40.34"?"audio/mpeg":b=="mjpg"?"application/mp4":null:"image/jpeg"}function kA(a){return a==vc?"text/vtt":XA.get(a).get("mp4")}
function bA(a,b){a=yz(a)?Math.trunc((b.length-1)/2):0;for(var c=b[a];c.Vc()==2&&a+1<b.length;)a++,c=b[a];return{segment:c,segmentIndex:a}}
function QA(a,b,c,d){var e,f,g,h,k,l,m,n,q,r,t,v,w;return Q(function(z){switch(z.g){case 1:e=ph;f=bA(a,d);g=f.segment;if(g.status==2)return z.return(kA(b));k=g.S();if(l=cp(k[0]))if(m=XA.get(b),(n=m.get(l))||(n=cA.get(l)))return z.return(n);if(h=jA(b,c))return z.return(h);r=1;t=jh(k,a.g.retryParameters);sa(z,2);t.method="HEAD";return E(z,eA(a,t,e,{type:r}).promise,4);case 4:v=z.h;q=v.headers["content-type"];ua(z,3);break;case 2:w=va(z);if(!w||w.code!=1002&&w.code!=1001){z.B(3);break}t.method="GET";
a.g.hls.allowRangeRequestsToGuessMimeType&&(t.headers.Range="bytes=0-0");return E(z,eA(a,t,e,{type:r}).promise,6);case 6:v=z.h,q=v.headers["content-type"];case 3:if(!q){z.B(7);break}h=q.toLowerCase().split(";")[0];if(h!="application/octet-stream"){z.B(8);break}if(v.data.byteLength){z.B(9);break}t.method="GET";return E(z,eA(a,t,e,{type:r}).promise,10);case 10:v=z.h;case 9:Hk(Lb(v.data))&&(h="video/mp2t");case 8:if(h!="application/octet-stream")return z.return(h);case 7:return z.return(kA(b))}})}
function LA(a,b,c,d,e,f,g){a&&(a.width=Number(b)||void 0,a.height=Number(c)||void 0,a.frameRate=Number(d)||void 0,a.hdr=e||void 0,a.videoLayout=f||void 0,a.colorGamut=g||void 0)}function wz(a,b,c){return eA(a,jh(b,a.g.retryParameters),0,{type:c?2:3})}
function uz(a){var b,c,d,e,f,g;return Q(function(h){switch(h.g){case 1:if(!a.h)return h.return();sa(h,2);b=Date.now();return E(h,a.update(),4);case 4:c=Date.now();yz(a)&&(d=(c-b)/1E3,a.pb.sample(1,d),e=a.g.updatePeriod>0?a.g.updatePeriod:a.u,f=Math.max(0,e-Qc(a.pb)),a.F.Y(f));ua(h,3);break;case 2:g=va(h);if(!a.h)return h.return();if(a.g.raiseFatalErrorOnManifestUpdateRequestFailure)return a.h.onError(g),h.return();g.severity=1;a.h.onError(g);a.F.Y(.1);case 3:if(!a.h)return h.return();a.h.onManifestUpdated();
H(h)}})}function yz(a){return a.Fa!=vz}function Bz(a,b){a.Fa=b;a.l&&a.l.td(!yz(a));yz(a)||a.F.stop()}function eA(a,b,c,d){if(!a.W)throw new U(2,7,7001);d||(d={});d.isPreload=a.mc();b=a.h.networkingEngine.request(c,b,d);dh(a.W,b);return b}function CA(a){return a=="AES-128"||a=="AES-256"||a=="AES-256-CTR"}
function tz(a,b,c,d){var e,f,g,h,k,l;return Q(function(m){if(m.g==1){if(c=="video/mp2t")throw new U(2,4,4040);if("apple"===window.shakaMediaKeysPolyfill)throw new U(2,4,4041);e=Xy(b,"METHOD");f=["SAMPLE-AES","SAMPLE-AES-CTR"];if(!f.includes(e))return m.return(null);g="cenc";e=="SAMPLE-AES"&&(g="cbcs");h=Xy(b,"URI");k=qc("com.apple.fps",g,[{initDataType:"sinf",initData:new Uint8Array(0),keyId:null}],h);var n=(new tb(h)).Lb.replace(/-/g,"").toLowerCase();return(l=n.length===32&&/^[0-9a-f]+$/.test(n)?
n:null)||!d?m.B(2):E(m,ZA(a,d),3)}m.g!=2&&(l=m.h);l&&k.keyIds.add(l);return m.return(k)})}
function DA(a,b,c,d,e,f){var g,h,k,l,m,n,q,r,t,v,w,z;return Q(function(y){switch(y.g){case 1:if(c=="video/mp2t")throw new U(2,4,4040);if("apple"===window.shakaMediaKeysPolyfill)throw new U(2,4,4041);g=Xy(b,"METHOD");h=["SAMPLE-AES","SAMPLE-AES-CTR"];if(!h.includes(g))return y.return(null);k=dz(d(),Xy(b,"URI"),f);if(k[0].startsWith("data:text/plain;base64,")){l=nc(lc(k[0].split("data:text/plain;base64,").pop()));y.B(2);break}m=k.sort().join("");a.ra.has(m)||(n=jh(k,a.g.retryParameters),q=eA(a,n,6).promise,
a.ra.set(m,q));return E(y,a.ra.get(m),3);case 3:r=y.h,l=nc(r.data);case 2:t="00000000000000000000000000000000";if(!e){y.B(4);break}return E(y,ZA(a,e),5);case 5:(v=y.h)&&(t=v);case 4:return w=new Map,w.set(t,l),z="cenc",g=="SAMPLE-AES"&&(z="cbcs"),y.return(rc(w,z))}})}
function ZA(a,b){var c,d,e,f;return Q(function(g){if(g.g==1){c=null;if(a.sa.has(b))return c=a.sa.get(b),g.B(2);d=Xm(b.S(),b.Uc(),b.Sc(),a.g.retryParameters);e=ph;return E(g,eA(a,d,e,{type:0}).promise,3)}g.g!=2&&(f=g.h,b.Ke(f.data),c=Vm(f.data),a.sa.set(b,c));return g.return(c)})}S("shaka.hls.HlsParser",sz);
var cA=(new Map).set("aac","audio/aac").set("ac3","audio/ac3").set("ec3","audio/ec3").set("mp3","audio/mpeg"),$A=(new Map).set("mp4","audio/mp4").set("mp4a","audio/mp4").set("m4s","audio/mp4").set("m4i","audio/mp4").set("m4a","audio/mp4").set("m4f","audio/mp4").set("cmfa","audio/mp4").set("ts","video/mp2t").set("tsa","video/mp2t"),aB=(new Map).set("mp4","video/mp4").set("mp4v","video/mp4").set("m4s","video/mp4").set("m4i","video/mp4").set("m4v","video/mp4").set("m4f","video/mp4").set("cmfv","video/mp4").set("ts",
"video/mp2t").set("tsv","video/mp2t"),bB=(new Map).set("mp4","application/mp4").set("m4s","application/mp4").set("m4i","application/mp4").set("m4f","application/mp4").set("cmft","application/mp4").set("vtt","text/vtt").set("webvtt","text/vtt").set("ttml","application/ttml+xml"),cB=(new Map).set("jpg","image/jpeg").set("png","image/png").set("svg","image/svg+xml").set("webp","image/webp").set("avif","image/avif"),XA=(new Map).set("audio",$A).set("video",aB).set("text",bB).set("image",cB),YA=new Set(["video/mp2t"].concat(x(hf))),
vz="VOD",TA="EVENT",fA="LIVE";Ni("application/x-mpegurl",function(){return new sz});Ni("application/vnd.apple.mpegurl",function(){return new sz});function dB(a){return Wv(a)}var eB=(new Map).set("com.microsoft.playready",dB).set("com.microsoft.playready.recommendation",dB).set("com.microsoft.playready.software",dB).set("com.microsoft.playready.hardware",dB);function fB(){var a=this;this.h=this.g=null;this.l=[];this.j=null;this.A=1;this.i=null;this.F=new Pc(5);this.u=new Gf(function(){gB(a)});this.D=new ch;this.m=new Map;this.C=function(){return!1}}p=fB.prototype;p.configure=function(a,b){this.g=a;b&&(this.C=b)};p.start=function(a,b){var c=this;return Q(function(d){if(d.g==1)return c.l=[a],c.h=b,E(d,hB(c),2);if(!c.h)throw new U(2,7,7001);return d.return(c.j)})};
function gB(a){var b;Q(function(c){switch(c.g){case 1:return sa(c,2),E(c,hB(a),4);case 4:ua(c,3);break;case 2:b=va(c),a.h&&(b.severity=1,a.h.onError(b));case 3:if(!a.h)return c.return();H(c)}})}p.stop=function(){this.g=this.h=null;this.l=[];this.j=null;this.u!=null&&(this.u.stop(),this.u=null);this.m.clear();return this.D.destroy()};
p.update=function(){var a=this,b;return Q(function(c){if(c.g==1)return sa(c,2),E(c,hB(a),4);if(c.g!=2)return ua(c,0);b=va(c);if(!a.h||!b)return c.return();a.h.onError(b);H(c)})};p.onExpirationUpdated=function(){};p.onInitialVariantChosen=function(){};p.banLocation=function(){};p.setMediaElement=function(){};
function hB(a){var b,c,d,e,f,g,h;return Q(function(k){if(k.g==1)return b=jh(a.l,a.g.retryParameters),c=a.h.networkingEngine,d=Date.now(),e=c.request(0,b,{type:5,isPreload:a.C()}),dh(a.D,e),E(k,e.promise,2);f=k.h;if(!a.h)return k.return();f.uri&&!a.l.includes(f.uri)&&a.l.unshift(f.uri);var l=f.uri,m=f.data,n=a.g.mss.manifestPreprocessor;if(n!=oo){bd("manifest.mss.manifestPreprocessor configuration","Please Use manifest.mss.manifestPreprocessorTXml instead.");m=Nx(m,"SmoothStreamingMedia");if(!m)throw new U(2,
4,4046,l);n(m);m=bc(m.outerHTML)}var q=Nd(m,"SmoothStreamingMedia");if(!q)throw new U(2,4,4046,l);l=a.g.mss.manifestPreprocessorTXml;l!=po&&l(q);a.i||(a.i=new Ol(null,0));if(l=be(q,"IsLive",le,!1))throw new U(2,4,4047);a.i.td(!l);n=be(q,"TimeScale",je,1E7);m=be(q,"DVRWindowLength",je);l&&(m===0||isNaN(m))&&(m=Infinity);var r=be(q,"CanSeek",le,!1);m===0&&r&&(m=Infinity);r=null;m&&m>0&&(r=m/n);l&&!isNaN(a.g.availabilityWindowOverride)&&(r=a.g.availabilityWindowOverride);r==null&&(r=Infinity);a.i.jg(r);
m=be(q,"Duration",je,Infinity);l||a.i.Ib(m/n);l={variants:[],textStreams:[],timescale:n,duration:m/n};var t;r=Vd(q,"Protection");n=a.g.mss.keySystemsBySystemId;m=[];r=u(r);for(t=r.next();!t.done;t=r.next())m=m.concat(Vd(t.value,"ProtectionHeader"));if(m.length){r=[];for(t=0;t<m.length;t++){var v=m[t],w=v.attributes.SystemID.toLowerCase(),z=n[w];if(z){var y;a:{if(y=Uv(v)){y=u(Yd(y,"DATA"));for(var A=y.next();!A.done;A=y.next())if(A=Zd(A.value,"KID")){y=lc(Wd(A));y=new Uint8Array([y[3],y[2],y[1],y[0],
y[5],y[4],y[7],y[6]].concat(x(y.slice(8))));y=nc(y);break a}}y=null}A=lc(Wd(v));w=mc(w.replace(/-/g,""));w=[{initData:Kh(A,w,new Set,0),initDataType:"cenc",keyId:y}];w=qc(z,"cenc",w);y&&w.keyIds.add(y);if(z=eB.get(z))w.licenseServerUri=z(v);r.push(w)}}n=r}else n=[];t=n;r=[];n=[];m=[];q=Vd(q,"StreamIndex");q=u(q);for(v=q.next();!v.done;v=q.next()){v=v.value;z=Vd(v,"QualityLevel");w=l.timescale;y=l.duration;A=Vd(v,"c");for(var C=[],F=0,D=0;D<A.length;++D){var B=A[D],G=A[D+1],K=be(B,"t",je),I=be(B,"d",
je);B=be(B,"r",he);if(!I)break;K=K!=null?K:F;(B=B||0)&&B--;if(B<0)if(G){G=be(G,"t",je);if(G==null)break;else if(K>=G)break;B=Math.ceil((G-K)/I)-1}else{if(y==Infinity)break;else if(K/w>=y)break;B=Math.ceil((y*w-K)/I)-1}for(G=0;G<=B;++G)F=K+I,C.push({start:K/w,end:F/w,xi:K}),K=F}w=C;z=u(z);for(y=z.next();!y.done;y=z.next())(y=iB(a,v,y.value,w,t,l))&&(y.type!="audio"||a.g.disableAudio?y.type!="video"||a.g.disableVideo?y.type!=vc||a.g.disableText||m.push(y):n.push(y):r.push(y))}q=[];r=u(r.length>0?r:
[null]);for(t=r.next();!t.done;t=r.next())for(t=t.value,v=u(n.length>0?n:[null]),C=v.next();!C.done;C=v.next())z=q,w=z.push,y=a,A=t,C=C.value,D=0,A&&A.bandwidth&&A.bandwidth>0&&(D+=A.bandwidth),C&&C.bandwidth&&C.bandwidth>0&&(D+=C.bandwidth),y={id:y.A++,language:A?A.language:"und",disabledUntilTime:0,primary:!!A&&A.primary||!!C&&C.primary,audio:A,video:C,bandwidth:D,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},w.call(z,y);l.variants=q;l.textStreams=m;a.j?(a.j.variants=l.variants,
a.j.textStreams=l.textStreams,a.h.filter(a.j)):(a.j={presentationTimeline:a.i,variants:l.variants,textStreams:l.textStreams,imageStreams:[],offlineSessionIds:[],sequenceMode:a.g.mss.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"MSS",serviceDescription:null,nextUrl:null,periodCount:1,gapCount:0,isLowLatency:!1,startTime:null},a.i.Mf());Promise.resolve();g=Date.now();h=(g-d)/1E3;a.F.sample(1,h);H(k)})}
function iB(a,b,c,d,e,f){var g=b.attributes.Type;if(g!=="audio"&&g!=="video"&&g!=="text")return bb("Ignoring unrecognized type:",g),null;var h=b.attributes.Language,k=a.A++,l=be(c,"Bitrate",ie),m=be(c,"MaxWidth",ie),n=be(c,"MaxHeight",ie),q=be(c,"Channels",ie),r=be(c,"SamplingRate",ie),t=f.duration;d.length&&(t=d[d.length-1].end-d[0].start);var v=a.i.getDuration();a.i.Ib(Math.min(t,v));(v=b.attributes.Name)&&(v+=c.attributes.Index);v||(v=String(k));var w={id:k,originalId:v,groupId:null,createSegmentIndex:function(){return Promise.resolve()},
closeSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:"",codecs:"",frameRate:void 0,pixelAspectRatio:void 0,bandwidth:l||0,width:m||void 0,height:n||void 0,kind:"",encrypted:e.length>0,drmInfos:e,keyIds:new Set,language:Bc(h||"und"),originalLanguage:h,label:"",type:"",primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:[],roles:[],forced:!1,channelsCount:q,audioSamplingRate:r,spatialAudio:!1,closedCaptions:null,hdr:void 0,colorGamut:void 0,videoLayout:void 0,
tilesLayout:void 0,matchedStreams:[],mssPrivateData:{duration:t,timescale:f.timescale,codecPrivateData:null},accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1,baseOriginalId:null};if(e=b.attributes.Subtype)(e=jB.get(e))&&w.roles.push(e),e==="main"&&(w.primary=!0);e=c.attributes.FourCC;if(e===null||e==="")e=b.attributes.FourCC;if(!e)if(g==="audio")e="AAC";else if(g==="video")return bb('FourCC is not defined whereas it is required for a QualityLevel element for a StreamIndex of type "video"'),
null;if(!kB.includes(e.toUpperCase()))return bb("Codec not supported:",e),null;c=lB(c,g,e,w);w.mssPrivateData.codecPrivateData=c;switch(g){case "audio":if(!c)return bb("Quality unsupported without CodecPrivateData",g),null;w.type="audio";w.mimeType="mss/audio/mp4";w.codecs=mB(e,c);break;case "video":if(!c)return bb("Quality unsupported without CodecPrivateData",g),null;w.type="video";w.mimeType="mss/video/mp4";w.codecs=nB(c);break;case "text":if(w.type=vc,w.mimeType="application/mp4",e==="TTML"||
e==="DFXP")w.codecs="stpp"}w.fullMimeTypes.add(gf(w.mimeType,w.codecs));w.createSegmentIndex=function(){if(w.segmentIndex)return Promise.resolve();if(a.m.has(w.id))var z=a.m.get(w.id);else z=[],w.type=="video"&&(z=w.mssPrivateData.codecPrivateData.split("00000001").slice(1)),z={id:w.id,type:w.type,codecs:w.codecs,encrypted:w.encrypted,timescale:w.mssPrivateData.timescale,duration:w.mssPrivateData.duration,Jb:z,Ma:new Uint8Array([]),Ya:new Uint8Array([]),eb:0,gb:0,data:null,stream:w},z=cj(new bj([z])),
a.m.set(w.id,z);z=oB(a,new Hj(function(){return[]},0,null,Bm(w),w.mssPrivateData.timescale,z,null,w.encrypted),w,b,d);w.segmentIndex=new mm(z);return Promise.resolve()};w.closeSegmentIndex=function(){w.segmentIndex&&(w.segmentIndex.release(),w.segmentIndex=null)};return w}
function lB(a,b,c,d){if(a=a.attributes.CodecPrivateData)return a;if(b!=="audio")return null;b=d.channelsCount||2;a=d.audioSamplingRate||44100;var e={96E3:0,88200:1,64E3:2,48E3:3,44100:4,32E3:5,24E3:6,22050:7,16E3:8,12E3:9,11025:10,8E3:11,7350:12};d=e[a];if(c==="AACH")return c=new Uint8Array(4),a=e[a*2],c[0]=40|d>>1,c[1]=d<<7|b<<3|a>>1,c[2]=a<<7|8,c[3]=0,b=new Uint16Array(2),b[0]=(c[0]<<8)+c[1],b[1]=(c[2]<<8)+c[3],b[0].toString(16)+b[1].toString(16);c=new Uint8Array(2);c[0]=16|d>>1;c[1]=d<<7|b<<3;
b=new Uint16Array(1);b[0]=(c[0]<<8)+c[1];return b[0].toString(16)}function mB(a,b){var c=0;a==="AACH"&&(c=5);b?c===0&&(c=(parseInt(b.substr(0,2),16)&248)>>3):(c=2,a==="AACH"&&(c=5));return"mp4a.40."+c}function nB(a){var b=/00000001[0-9]7/.exec(a);return b.length&&a?"avc1."+a.substr(a.indexOf(b[0])+10,6):""}
function oB(a,b,c,d,e){var f=d.attributes.Url.replace("{bitrate}",String(c.bandwidth));d=[];e=u(e);for(var g=e.next(),h={};!g.done;h={pg:void 0},g=e.next())h.pg=g.value,d.push(new Jj(h.pg.start,h.pg.end,function(k){return function(){return pc(a.l,[f.replace("{start time}",String(k.pg.xi))])}}(h),0,null,b,0,0,c.mssPrivateData.duration));return d}S("shaka.mss.MssParser",fB);
var kB="AAC AACL AACH AACP AVC1 H264 TTML DFXP".split(" "),jB=(new Map).set("CAPT","main").set("SUBT","alternate").set("DESC","main");Ni("application/vnd.ms-sstr+xml",function(){return new fB});function pB(a,b,c,d,e,f,g){if(c>=200&&c<=299&&c!=202||c==304)return{uri:e||d,originalUri:d,data:b,status:c,headers:a,fromCache:!!a["x-shaka-from-cache"],originalRequest:f};f=null;try{f=ac(b)}catch(h){}throw new U(c==401||c==403?2:1,1,1001,d,c,f,a,g,e||d);};function qB(){}
function rB(a,b,c,d,e,f){var g=new sB;try{th(b.headers).forEach(function(m,n){g.append(n,m)})}catch(m){return Xg(new U(1,1,1002,a,m,c))}var h=new tB,k={Ki:!1,hk:!1};a=uB(a,b,c,{body:b.body||void 0,headers:g,method:b.method,signal:h.signal,credentials:b.allowCrossSiteCredentials?"include":void 0},k,d,e,b.streamDataCallback,f.minBytesForProgressEvents||0);a=new Wg(a,function(){k.Ki=!0;h.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var l=new Gf(function(){k.hk=!0;h.abort()});l.Y(b/
1E3);a.finally(function(){l.stop()})}return a}
function uB(a,b,c,d,e,f,g,h,k){var l,m,n,q,r,t,v,w,z,y,A,C,F,D,B;return Q(function(G){switch(G.g){case 1:return l=vB,m=wB,q=new ArrayBuffer(0),t=r=0,v={},w=Date.now(),sa(G,2),E(G,l(a,d),4);case 4:n=G.h;v=xB(n.headers);g(v);if(d.method=="HEAD"){G.B(5);break}y=(z=n.headers.get("Content-Length"))?parseInt(z,10):0;if(!n.body)return E(G,n.arrayBuffer(),9);A=n.clone().body.getReader();C=function(K){function I(){var J,L,N,P;return Q(function(O){switch(O.g){case 1:return sa(O,2),E(O,A.read(),4);case 4:J=
O.h;ua(O,3);break;case 2:return va(O),O.return();case 3:if(J.done){O.B(5);break}r+=J.value.byteLength;if(!h){O.B(5);break}return E(O,h(J.value),5);case 5:L=Date.now();N=r-t;if(L-w>100&&N>=k||J.done)P=J.done?0:y-r,f(L-w,N,P),t=r,w=L;J.done?K.close():(K.enqueue(J.value),I());H(O)}})}I()};new m({start:C});return E(G,n.arrayBuffer(),8);case 8:q=G.h;G.B(5);break;case 9:q=G.h,F=Date.now(),f(F-w,q.byteLength,0);case 5:b.headers.Range&&(D=b.headers.Range.replace("bytes=","").split("-").filter(function(K){return K}).map(function(K){return parseInt(K,
10)}),D.length==2&&q.byteLength!=D[1]-D[0]+1&&bb("Payload length does not match range requested bytes",b,n));ua(G,3);break;case 2:B=va(G);if(e.Ki)throw new U(1,1,7001,a,c);if(e.hk)throw new U(1,1,1003,a,c);throw new U(1,1,1002,a,B,c);case 3:return G.return(pB(v,q,n.status,a,n.url,b,c))}})}function xB(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}
function yB(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;if(window.Response){if(!(new Response("")).body)return!1}else return!1;return!(!window.fetch||"polyfill"in window.fetch||!window.AbortController)}S("shaka.net.HttpFetchPlugin",qB);qB.isSupported=yB;qB.parse=rB;var vB=window.fetch,tB=window.AbortController,wB=window.ReadableStream,sB=window.Headers;yB()&&(fh("http",rB,2,!0),fh("https",rB,2,!0),fh("blob",rB,2,!0));function zB(){}
function AB(a,b,c,d,e,f){var g=new BB,h=Date.now(),k=0,l=new Promise(function(m,n){g.open(b.method,a,!0);g.responseType="arraybuffer";g.timeout=b.retryParameters.timeout;g.withCredentials=b.allowCrossSiteCredentials;var q={};g.onabort=function(){n(new U(1,1,7001,a,c))};g.onreadystatechange=function(){if(g.readyState===XMLHttpRequest.HEADERS_RECEIVED){var t=g.getAllResponseHeaders().trim().split("\r\n"),v={};t=u(t);for(var w=t.next();!w.done;w=t.next())w=w.value.split(": "),v[w[0].toLowerCase()]=w.slice(1).join(": ");
q=v;e(q)}};g.onload=function(t){var v=g.response;try{d(Date.now()-h,t.loaded-k,0);var w=pB(q,v,g.status,a,g.responseURL,b,c);m(w)}catch(z){n(z)}};g.onerror=function(t){n(new U(1,1,1002,a,t,c))};g.ontimeout=function(){n(new U(1,1,1003,a,c))};g.onprogress=function(t){var v=Date.now(),w=f.minBytesForProgressEvents||0,z=t.loaded-k;if(v-h>100&&z>=w||t.lengthComputable&&t.loaded==t.total)d(v-h,z,g.readyState==4?0:t.total-t.loaded),k=t.loaded,h=v};for(var r in b.headers)try{g.setRequestHeader(r.toLowerCase(),
b.headers[r])}catch(t){throw new U(1,1,1002,a,t,c);}g.send(b.body)});return new Wg(l,function(){g.abort();return Promise.resolve()})}S("shaka.net.HttpXHRPlugin",zB);zB.parse=AB;var BB=window.XMLHttpRequest;fh("http",AB,1,!0);fh("https",AB,1,!0);fh("blob",AB,1,!0);function CB(a,b,c,d,e){this.g=a;this.i=b;this.groupId=c;this.h=d;this.j=e}function DB(a){var b=a.kc(!1);return b?jc(b):a.S().map(function(c){return"{"+encodeURI(c.split("#xywh=")[0])+"}"}).join("")+":"+a.startByte+":"+a.endByte}function EB(a,b){return Xm(a.g.S(),a.g.startByte,a.g.endByte,b.streaming.retryParameters)};function FB(){this.g=this.j=this.i=0;this.h=new Map;this.l=0}function GB(a,b){a.i+=b;var c=a.l;a.l++;a.h.set(c,b);return c}FB.prototype.close=function(a,b){if(this.h.has(a)){var c=this.h.get(a);this.h.delete(a);this.j+=c;this.g+=b}};function HB(a){return a.i==0?0:a.j/a.i};function IB(a){var b=this;this.A=a;this.i=new Map;this.h=new rh(function(){return JB(b).catch(function(){})});this.j=[];this.u=function(){};this.m=function(){};this.g=new FB;this.l=!1}IB.prototype.destroy=function(){return this.h.destroy()};function KB(a,b,c){a.u=b;a.m=c}function JB(a){a.l=!0;var b=a.j.map(function(c){return c()});a.j=[];return Promise.all(b)}
IB.prototype.queue=function(a,b,c,d,e){var f=this;sh(this.h);var g=(this.i.get(a)||Promise.resolve()).then(function(){var h,k,l,m,n,q,r;return Q(function(t){if(t.g==1)return E(t,LB(f,b),2);h=t.h;if(f.h.g)throw new U(2,9,7001);if(d)for(m in k=Lb(h),l=new Jh(k),l.data)n=Number(m),q=l.data[n],r=l.g[n],f.m(q,r);f.g.close(c,h.byteLength);f.u(HB(f.g),f.g.g);return t.return(e(h))})});this.i.set(a,g);return g};
function MB(a,b,c,d,e,f){sh(a.h);var g=(a.i.get(b)||Promise.resolve()).then(function(){if(a.h.g)throw new U(2,9,7001);if(e){var h=Lb(c);h=new Jh(h);for(var k in h.data){var l=Number(k);a.m(h.data[l],h.g[l])}}a.g.close(d,c.byteLength);a.u(HB(a.g),a.g.g);return f(c)});a.i.set(b,g)}function NB(a){return Q(function(b){return b.g==1?E(b,Promise.all(a.i.values()),2):b.return(a.g.g)})}
function LB(a,b){var c,d,e,f;return Q(function(g){if(g.g==1)return c=ph,d=a.A.request(c,b),e=function(){return d.abort()},a.j.push(e),E(g,d.promise,2);f=g.h;Tc(a.j,e);return g.return(f.data)})};function OB(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new Kg;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}OB.prototype.abort=function(){var a=this;return Q(function(b){if(b.g==1){try{a.i.abort()}catch(c){}sa(b,2);return E(b,a.g,4)}if(b.g!=2)return ua(b,0);va(b);H(b)})};
function PB(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return Q(function(g){if(g.g==1){if(e.result==null)return c(),g.return();f=e.result;return E(g,b(f.key,f.value,f),2)}f.continue();H(g)})}})}OB.prototype.store=function(){return this.h};OB.prototype.promise=function(){return this.g};function QB(a){this.h=a;this.g=[]}QB.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function RB(a,b){return SB(a,b,"readwrite")}function SB(a,b,c){c=a.h.transaction([b],c);var d=new OB(c,b);a.g.push(d);d.promise().then(function(){Tc(a.g,d)},function(){Tc(a.g,d)});return d};function TB(a,b,c){this.h=new QB(a);this.i=b;this.g=c}p=TB.prototype;p.destroy=function(){return this.h.destroy()};p.hasFixedKeySpace=function(){return!0};p.addSegments=function(){return UB(this.i)};p.removeSegments=function(a,b){return VB(this,this.i,a,b)};p.getSegments=function(a){var b=this,c;return Q(function(d){if(d.g==1)return E(d,WB(b,b.i,a),2);c=d.h;return d.return(c.map(function(e){return b.Pi(e)}))})};p.addManifests=function(){return UB(this.g)};
p.updateManifest=function(){return Promise.reject(new U(2,9,9016,"Cannot modify values in "+this.g))};function XB(a,b,c){a=RB(a.h,a.g);var d=a.store();d.get(b).onsuccess=function(){d.put(c,b)};return a.promise()}p.updateManifestExpiration=function(a,b){var c=RB(this.h,this.g),d=c.store();d.get(a).onsuccess=function(e){if(e=e.target.result)e.expiration=b,d.put(e,a)};return c.promise()};p.removeManifests=function(a,b){return VB(this,this.g,a,b)};
p.getManifests=function(a){var b=this,c;return Q(function(d){if(d.g==1)return E(d,WB(b,b.g,a),2);c=d.h;return d.return(Promise.all(c.map(function(e){return b.ke(e)})))})};p.getAllManifests=function(){var a=this,b,c;return Q(function(d){return d.g==1?(b=SB(a.h,a.g,"readonly"),c=new Map,E(d,PB(b,function(e,f){var g;return Q(function(h){if(h.g==1)return E(h,a.ke(f),2);g=h.h;c.set(e,g);H(h)})}),2)):d.g!=3?E(d,b.promise(),3):d.return(c)})};p.Pi=function(a){return a};p.ke=function(a){return Promise.resolve(a)};
function UB(a){return Promise.reject(new U(2,9,9011,"Cannot add new value to "+a))}p.add=function(a,b){var c=this,d,e,f,g,h,k,l;return Q(function(m){if(m.g==1){d=RB(c.h,a);e=d.store();f=[];g=u(b);h=g.next();for(k={};!h.done;k={Vh:void 0},h=g.next())l=h.value,k.Vh=e.add(l),k.Vh.onsuccess=function(n){return function(){f.push(n.Vh.result)}}(k);return E(m,d.promise(),2)}return m.return(f)})};
function VB(a,b,c,d){a=RB(a.h,b);b=a.store();c=u(c);for(var e=c.next(),f={};!e.done;f={Ih:void 0},e=c.next())f.Ih=e.value,b.delete(f.Ih).onsuccess=function(g){return function(){return d(g.Ih)}}(f);return a.promise()}
function WB(a,b,c){var d,e,f,g,h,k,l;return Q(function(m){if(m.g==1){d=SB(a.h,b,"readonly");e=d.store();f={};g=[];h=u(c);k=h.next();for(l={};!k.done;l={dg:void 0,If:void 0},k=h.next())l.If=k.value,l.dg=e.get(l.If),l.dg.onsuccess=function(n){return function(){n.dg.result==void 0&&g.push(n.If);f[n.If]=n.dg.result}}(l);return E(m,d.promise(),2)}if(g.length)throw new U(2,9,9012,"Could not find values for "+g);return m.return(c.map(function(n){return f[n]}))})};function YB(a){this.g=new QB(a)}YB.prototype.destroy=function(){return this.g.destroy()};YB.prototype.getAll=function(){var a=this,b,c;return Q(function(d){return d.g==1?(b=SB(a.g,"session-ids","readonly"),c=[],E(d,PB(b,function(e,f){c.push(f)}),2)):d.g!=3?E(d,b.promise(),3):d.return(c)})};YB.prototype.add=function(a){var b=RB(this.g,"session-ids"),c=b.store();a=u(a);for(var d=a.next();!d.done;d=a.next())c.add(d.value);return b.promise()};
YB.prototype.remove=function(a){var b=this,c;return Q(function(d){return d.g==1?(c=RB(b.g,"session-ids"),E(d,PB(c,function(e,f,g){a.includes(f.sessionId)&&g.delete()}),2)):E(d,c.promise(),0)})};function ZB(){this.g=new Map}ZB.prototype.destroy=function(){for(var a=[],b=u(this.g.values()),c=b.next();!c.done;c=b.next())a.push(c.value.destroy());this.g.clear();return Promise.all(a)};ZB.prototype.init=function(){var a=this;$B.forEach(function(e,f){(e=e())&&a.g.set(f,e)});for(var b=[],c=u(this.g.values()),d=c.next();!d.done;d=c.next())b.push(d.value.init());return Promise.all(b)};
function aC(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{$b:d,kb:f},kb:e})})});if(b)return b;throw new U(2,9,9013,"Could not find a cell that supports add-operations");}function bC(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({$b:d,kb:f},e)})})}
function cC(a,b,c){a=a.g.get(b);if(!a)throw new U(2,9,9013,"Could not find mechanism with name "+b);b=a.getCells().get(c);if(!b)throw new U(2,9,9013,"Could not find cell with name "+c);return b}function dC(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function eC(a){var b=Array.from(a.g.keys());if(!b.length)throw new U(2,9,9E3,"No supported storage mechanisms found");return a.g.get(b[0]).getEmeSessionCell()}
function fC(a){var b,c,d;return Q(function(e){return e.g==1?(b=Array.from(a.g.values()),c=b.length>0,c||(d=$B,d.forEach(function(f){(f=f())&&b.push(f)})),E(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.B(0):E(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function gC(a,b){$B.set(a,b)}S("shaka.offline.StorageMuxer",ZB);ZB.unregister=function(a){$B.delete(a)};ZB.register=gC;ZB.prototype.destroy=ZB.prototype.destroy;var $B=new Map;function hC(){TB.apply(this,arguments)}ma(hC,TB);hC.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return Q(function(g){d=RB(c.h,c.g);e=d.store();f=new Kg;e.get(a).onsuccess=function(h){(h=h.target.result)?(h.expiration=b,e.put(h),f.resolve()):f.reject(new U(2,9,9012,"Could not find values for "+a))};return E(g,Promise.all([d.promise(),f]),0)})};
hC.prototype.ke=function(a){var b,c,d,e,f,g;return Q(function(h){if(h.g==1){b=[];for(c=0;c<a.periods.length;++c)d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime,e=d-a.periods[c].startTime,f=iC(a.periods[c],e),b.push(f);return E(h,jx(b),2)}g=h.h;return h.return({creationTime:0,originalManifestUri:a.originalManifestUri,duration:a.duration,size:a.size,expiration:a.expiration==null?Infinity:a.expiration,streams:g,sessionIds:a.sessionIds,drmInfo:a.drmInfo,appMetadata:a.appMetadata,sequenceMode:!1})})};
function iC(a,b){jC(a);for(var c=u(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return kC(e,a.startTime,b)})}
function kC(a,b,c){var d=a.initSegmentUri?lC(a.initSegmentUri):null,e=b+a.presentationTimeOffset,f=b+c;return{id:a.id,originalId:null,groupId:null,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:void 0,hdr:void 0,colorGamut:void 0,videoLayout:void 0,kind:a.kind,language:a.language,originalLanguage:a.language||null,label:a.label,width:a.width,height:a.height,initSegmentKey:d,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(g){var h=
lC(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,dataKey:h,initSegmentKey:d,appendWindowStart:b,appendWindowEnd:f,timestampOffset:e,tilesLayout:"",mimeType:null,codecs:null,thumbnailSprite:null}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1,isAudioMuxedInVideo:!1}}hC.prototype.Pi=function(a){return{data:a.data}};
function lC(a){var b;if((b=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(a))||(b=/^offline:segment\/([0-9]+)$/.exec(a)))return Number(b[1]);throw new U(2,9,9004,"Could not parse uri "+a);}
function jC(a){var b=a.streams.filter(function(h){return h.contentType=="audio"});a=a.streams.filter(function(h){return h.contentType=="video"});if(!b.every(function(h){return h.variantIds})||!a.every(function(h){return h.variantIds})){for(var c=u(b),d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=u(a);for(d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=0;if(a.length&&!b.length){d=c++;for(var e=u(a),f=e.next();!f.done;f=e.next())f.value.variantIds.push(d)}if(!a.length&&b.length)for(d=
c++,e=u(b),f=e.next();!f.done;f=e.next())f.value.variantIds.push(d);if(a.length&&b.length)for(b=u(b),d=b.next();!d.done;d=b.next())for(d=d.value,e=u(a),f=e.next();!f.done;f=e.next()){f=f.value;var g=c++;d.variantIds.push(g);f.variantIds.push(g)}}};function mC(){TB.apply(this,arguments)}ma(mC,TB);
mC.prototype.ke=function(a){var b,c,d,e,f,g;return Q(function(h){if(h.g==1){b=[];for(c=0;c<a.periods.length;++c){d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime;e=d-a.periods[c].startTime;for(var k=a.periods[c],l=[],m=u(k.streams),n=m.next();!n.done;n=m.next())n=n.value,n.variantIds.length!=0&&l.push(nC(n,k.startTime,k.startTime+e));f=l;b.push(f)}return E(h,jx(b),2)}g=h.h;return h.return({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:a.expiration==
null?Infinity:a.expiration,originalManifestUri:a.originalManifestUri,sessionIds:a.sessionIds,size:a.size,streams:g,sequenceMode:!1})})};
function nC(a,b,c){return{id:a.id,originalId:a.originalId,groupId:null,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:a.pixelAspectRatio,hdr:void 0,colorGamut:void 0,videoLayout:void 0,kind:a.kind,language:a.language,originalLanguage:a.language||null,label:a.label,width:a.width,height:a.height,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(d){return{startTime:b+d.startTime,endTime:b+d.endTime,initSegmentKey:a.initSegmentKey,
appendWindowStart:b,appendWindowEnd:c,timestampOffset:b-a.presentationTimeOffset,dataKey:d.dataKey,tilesLayout:"",mimeType:null,codecs:null,thumbnailSprite:null}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1,isAudioMuxedInVideo:!1}};function oC(){TB.apply(this,arguments)}ma(oC,TB);p=oC.prototype;p.hasFixedKeySpace=function(){return!1};p.addSegments=function(a){return this.add(this.i,a)};p.addManifests=function(a){return this.add(this.g,a)};p.updateManifest=function(a,b){return XB(this,a,b)};p.ke=function(a){a.expiration==null&&(a.expiration=Infinity);return Promise.resolve(a)};function pC(){this.m=this.j=this.i=this.h=this.g=this.l=null}p=pC.prototype;
p.init=function(){var a=this,b=new Kg,c=!1,d=new Gf(function(){c=!0;b.reject(new U(2,9,9017))});typeof qC==="number"&&qC>0&&d.Y(qC);var e=window.indexedDB.open("shaka_offline_db",5);e.onsuccess=function(){if(!c){d.stop();var f=e.result;a.l=f;var g=f.objectStoreNames;g=g.contains("manifest")&&g.contains("segment")?new hC(f,"segment","manifest"):null;a.g=g;g=f.objectStoreNames;g=g.contains("manifest-v2")&&g.contains("segment-v2")?new mC(f,"segment-v2","manifest-v2"):null;a.h=g;g=f.objectStoreNames;
g=g.contains("manifest-v3")&&g.contains("segment-v3")?new mC(f,"segment-v3","manifest-v3"):null;a.i=g;g=f.objectStoreNames;g=g.contains("manifest-v5")&&g.contains("segment-v5")?new oC(f,"segment-v5","manifest-v5"):null;a.j=g;f=f.objectStoreNames.contains("session-ids")?new YB(f):null;a.m=f;b.resolve()}};e.onupgradeneeded=function(){for(var f=e.result,g=u(["segment-v5","manifest-v5","session-ids"]),h=g.next();!h.done;h=g.next())h=h.value,f.objectStoreNames.contains(h)||f.createObjectStore(h,{autoIncrement:!0})};
e.onerror=function(f){c||(d.stop(),b.reject(new U(2,9,9001,e.error)),f.preventDefault())};return b};p.destroy=function(){var a=this;return Q(function(b){switch(b.g){case 1:if(!a.g){b.B(2);break}return E(b,a.g.destroy(),2);case 2:if(!a.h){b.B(4);break}return E(b,a.h.destroy(),4);case 4:if(!a.i){b.B(6);break}return E(b,a.i.destroy(),6);case 6:if(!a.j){b.B(8);break}return E(b,a.j.destroy(),8);case 8:if(!a.m){b.B(10);break}return E(b,a.m.destroy(),10);case 10:a.l&&a.l.close(),H(b)}})};
p.getCells=function(){var a=new Map;this.g&&a.set("v1",this.g);this.h&&a.set("v2",this.h);this.i&&a.set("v3",this.i);this.j&&a.set("v5",this.j);return a};p.getEmeSessionCell=function(){return this.m};
p.erase=function(){var a=this;return Q(function(b){switch(b.g){case 1:if(!a.g){b.B(2);break}return E(b,a.g.destroy(),2);case 2:if(!a.h){b.B(4);break}return E(b,a.h.destroy(),4);case 4:if(!a.i){b.B(6);break}return E(b,a.i.destroy(),6);case 6:if(!a.j){b.B(8);break}return E(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),E(b,rC(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,E(b,a.init(),0)}})};
function rC(){var a=new Kg,b=window.indexedDB.deleteDatabase("shaka_offline_db");b.onblocked=function(){};b.onsuccess=function(){a.resolve()};b.onerror=function(c){a.reject(new U(2,9,9001,b.error));c.preventDefault()};return a}var qC=5;S("shaka.offline.indexeddb.StorageMechanismOpenTimeout",qC);gC("idb",function(){return Tb().oi()?new pC:null});function sC(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}sC.prototype.$b=function(){return this.i};sC.prototype.kb=function(){return this.h};sC.prototype.key=function(){return this.l};sC.prototype.toString=function(){return this.j};
function tC(a){a=/^offline:([a-z]+)\/([^/]+)\/([^/]+)\/([0-9]+)$/.exec(a);if(a==null)return null;var b=a[1];if(b!="manifest"&&b!="segment")return null;var c=a[2];if(!c)return null;var d=a[3];return d&&b!=null?new sC(b,c,d,Number(a[4])):null};function uC(a,b){this.h=a;this.g=b}
function vC(a,b){var c=new Ol(null,0);c.Ib(b.duration);var d=b.streams.filter(function(l){return l.type=="audio"}),e=b.streams.filter(function(l){return l.type=="video"});d=wC(a,d,e,c);e=b.streams.filter(function(l){return l.type==vc}).map(function(l){return xC(a,l,c)});var f=b.streams.filter(function(l){return l.type=="image"}).map(function(l){return xC(a,l,c)}),g=b.drmInfo?[b.drmInfo]:[];if(b.drmInfo)for(var h=u(d.values()),k=h.next();!k.done;k=h.next())k=k.value,k.audio&&k.audio.encrypted&&(k.audio.drmInfos=
g),k.video&&k.video.encrypted&&(k.video.drmInfos=g);return{presentationTimeline:c,offlineSessionIds:b.sessionIds,variants:Array.from(d.values()),textStreams:e,imageStreams:f,sequenceMode:b.sequenceMode||!1,ignoreManifestTimestampsInSegmentsMode:!1,type:b.type||"UNKNOWN",serviceDescription:null,nextUrl:null,periodCount:1,gapCount:0,isLowLatency:!1,startTime:null}}
function wC(a,b,c,d){for(var e=new Set,f=u(b),g=f.next();!g.done;g=f.next()){g=u(g.value.variantIds);for(var h=g.next();!h.done;h=g.next())e.add(h.value)}f=u(c);for(g=f.next();!g.done;g=f.next())for(g=u(g.value.variantIds),h=g.next();!h.done;h=g.next())e.add(h.value);f=new Map;e=u(e);for(g=e.next();!g.done;g=e.next())g=g.value,f.set(g,{id:g,language:"",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});b=u(b);for(e=b.next();!e.done;e=
b.next())for(g=e.value,e=xC(a,g,d),g=u(g.variantIds),h=g.next();!h.done;h=g.next())h=f.get(h.value),h.language=e.language,h.primary=h.primary||e.primary,h.audio=e;c=u(c);for(b=c.next();!b.done;b=c.next())for(e=b.value,b=xC(a,e,d),e=u(e.variantIds),g=e.next();!g.done;g=e.next())g=f.get(g.value),g.primary=g.primary||b.primary,g.video=b;return f}
function xC(a,b,c){var d=b.segments.map(function(e){return yC(a,e,b)});c.De(d);return{id:b.id,originalId:b.originalId,groupId:b.groupId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new mm(d),mimeType:b.mimeType,codecs:b.codecs,width:b.width||void 0,height:b.height||void 0,frameRate:b.frameRate,pixelAspectRatio:b.pixelAspectRatio,hdr:b.hdr,colorGamut:b.colorGamut,videoLayout:b.videoLayout,kind:b.kind,encrypted:b.encrypted,drmInfos:[],keyIds:b.keyIds,language:b.language,originalLanguage:b.originalLanguage||
null,label:b.label,type:b.type,primary:b.primary,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout,mssPrivateData:b.mssPrivateData,accessibilityPurpose:null,external:b.external,fastSwitching:b.fastSwitching,fullMimeTypes:new Set([gf(b.mimeType,b.codecs)]),isAudioMuxedInVideo:b.isAudioMuxedInVideo||!1,baseOriginalId:null}}
function yC(a,b,c){var d=new sC("segment",a.h,a.g,b.dataKey);a=new Jj(b.startTime,b.endTime,function(){return[d.toString()]},0,null,b.initSegmentKey!=null?zC(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"");a.mimeType=b.mimeType||c.mimeType||"";a.codecs=b.codecs||c.codecs||"";b.thumbnailSprite&&a.lg(b.thumbnailSprite);return a}function zC(a,b){var c=new sC("segment",a.h,a.g,b);return new Hj(function(){return[c.toString()]},0,null)};function AC(){this.g=null}p=AC.prototype;p.configure=function(){};
p.start=function(a,b){var c=this,d,e,f,g,h,k,l;return Q(function(m){switch(m.g){case 1:d=tC(a);c.g=d;if(d==null||d.g!="manifest")throw new U(2,1,9004,a);e=new ZB;ta(m,2);return E(m,e.init(),4);case 4:return E(m,cC(e,d.$b(),d.kb()),5);case 5:return f=m.h,E(m,f.getManifests([d.key()]),6);case 6:return g=m.h,h=g[0],k=new uC(d.$b(),d.kb()),l=vC(k,h),b.makeTextStreamsForClosedCaptions(l),m.return(l);case 2:return ya(m),E(m,e.destroy(),7);case 7:za(m,0)}})};p.stop=function(){return Promise.resolve()};
p.update=function(){};
p.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return Q(function(m){switch(m.g){case 1:return d=c.g,e=new ZB,sa(m,2,3),E(m,e.init(),5);case 5:return E(m,cC(e,d.$b(),d.kb()),6);case 6:return f=m.h,E(m,f.getManifests([d.key()]),7);case 7:g=m.h;h=g[0];k=h.sessionIds.includes(a);l=h.expiration==void 0||h.expiration>b;if(!k||!l){m.B(3);break}return E(m,f.updateManifestExpiration(d.key(),b),3);case 3:return ya(m),E(m,e.destroy(),10);case 10:za(m,0);break;case 2:va(m),m.B(3)}})};
p.onInitialVariantChosen=function(){};p.banLocation=function(){};p.setMediaElement=function(){};Ni("application/x-offline-manifest",function(){return new AC});function BC(){}function CC(a,b){var c=tC(a);c&&c.g=="manifest"?(a={uri:a,originalUri:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"},originalRequest:b},a=Zg(a)):a=c&&c.g=="segment"?DC(c.key(),c,b):Xg(new U(2,1,9004,a));return a}
function DC(a,b,c){var d=new ZB;return Zg(void 0).bb(function(){return d.init()}).bb(function(){return cC(d,b.$b(),b.kb())}).bb(function(e){return e.getSegments([b.key()])}).bb(function(e){return{uri:b,data:e[0].data,headers:{},originalRequest:c}}).finally(function(){return d.destroy()})}S("shaka.offline.OfflineScheme",BC);BC.plugin=CC;fh("offline",CC);function EC(a,b,c){var d,e,f,g,h,k;return Q(function(l){switch(l.g){case 1:d=[];for(var m=[],n=u(c),q=n.next();!q.done;q=n.next()){q=q.value;for(var r=!1,t=u(m),v=t.next();!v.done;v=t.next())if(v=v.value,FC(v.info,q)){v.sessionIds.push(q.sessionId);r=!0;break}r||m.push({info:q,sessionIds:[q.sessionId]})}e=u(m);f=e.next();case 2:if(f.done){l.B(4);break}g=f.value;h=GC(a,b,g);return E(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.B(2);break;case 4:return l.return(d)}})}
function GC(a,b,c){var d,e;return Q(function(f){switch(f.g){case 1:return d=new Lh({Fc:b,onError:function(){},Uf:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),sa(f,2),d.configure(a),E(f,Th(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:ua(f,3);break;case 2:return va(f),E(f,d.destroy(),5);case 5:return f.return([]);case 3:return e=[],E(f,Promise.all(c.sessionIds.map(function(g){return Q(function(h){if(h.g==
1)return sa(h,2),E(h,fi(d,g),4);if(h.g!=2)return e.push(g),ua(h,0);va(h);H(h)})})),6);case 6:return E(f,d.destroy(),7);case 7:return f.return(e)}})}function FC(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&Uc(a.audioCapabilities,b.audioCapabilities,c)&&Uc(a.videoCapabilities,b.videoCapabilities,c)};function HC(a,b,c){var d=b.presentationTimeline.getDuration();b=IC(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function JC(a,b){var c=vC(new uC(a.$b(),a.kb()),b),d=b.appMetadata||{};c=IC(c);return{offlineUri:a.toString(),originalManifestUri:b.originalManifestUri,duration:b.duration,size:b.size,expiration:b.expiration,tracks:c,appMetadata:d,isIncomplete:b.isIncomplete||!1}}
function IC(a){var b=[],c=pg(a.variants);c=u(c);for(var d=c.next();!d.done;d=c.next())b.push(gg(d.value));a=u(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(hg(c.value));return b};function KC(){this.g=new Map}function LC(a,b){var c=b.audio,d=b.video;c&&!d&&a.g.set(c.id,c.bandwidth||b.bandwidth);!c&&d&&a.g.set(d.id,d.bandwidth||b.bandwidth);if(c&&d){var e=c.bandwidth||393216,f=d.bandwidth||b.bandwidth-e;f<=0&&(f=b.bandwidth);a.g.set(c.id,e);a.g.set(d.id,f)}}function MC(a,b){a.g.set(b.id,b.bandwidth||2048)}function NC(a,b){a=a.g.get(b);a==null&&(a=0);return a};function OC(a){var b=this;if(a&&a.constructor!=X)throw new U(2,9,9008);this.g=this.h=null;a?(this.h=a.g,this.g=a.Xb()):(this.h=no(),this.g=new eh,this.g.configure(this.h.networking));this.i=[];this.l=[];var c=!a;this.j=new rh(function(){var d,e,f,g,h;return Q(function(k){switch(k.g){case 1:return E(k,Promise.all(b.l.map(function(l){return JB(l)})),2);case 2:d=function(){};e=[];f=u(b.i);for(g=f.next();!g.done;g=f.next())h=g.value,e.push(h.then(d,d));return E(k,Promise.all(e),3);case 3:if(!c){k.B(4);
break}return E(k,b.g.destroy(),4);case 4:b.h=null,b.g=null,H(k)}})});this.m=1E9}function PC(){if(Qi(Tb()))a:{var a=u($B.values());for(var b=a.next();!b.done;b=a.next())if(b=b.value,b=b()){b.destroy();a=!0;break a}a=!1}else a=!1;return a}p=OC.prototype;p.destroy=function(){return this.j.destroy()};p.configure=function(a,b){arguments.length==2&&typeof a=="string"&&(a=Rn(a,b));return so(this.h,a)};p.getConfiguration=function(){var a=no();so(a,this.h,no());return a};p.Xb=function(){return this.g};
p.store=function(a,b,c,d,e){var f=this,g=this.getConfiguration(),h=new IB(this.g);this.l.push(h);b=QC(this,a,b||{},d||[],e||[],function(){var k;return Q(function(l){if(l.g==1)return c?l.B(2):E(l,bp(a,f.g,g.manifest.retryParameters),3);l.g!=2&&(c=l.h);k=Si(a,c||null);return l.return(k())})},g,h);b=new Wg(b,function(){return JB(h)});b.finally(function(){Tc(f.l,h)});return RC(this,b)};
function QC(a,b,c,d,e,f,g,h){var k,l,m,n,q,r,t,v,w,z,y,A,C,F,D,B,G,K,I,J,L,N,P,O;return Q(function(M){switch(M.g){case 1:return SC(),l=k=null,m=new ZB,r=q=n=null,sa(M,2,3),E(M,f(),5);case 5:return k=M.h,E(M,TC(a,b,k,g),6);case 6:t=M.h;UC(a);v=!t.presentationTimeline.U()&&!t.presentationTimeline.md();if(!v)throw new U(2,9,9005,b);w=u(d);z=w.next();case 7:if(z.done){M.B(9);break}y=z.value;return E(M,VC(a,y,t),10);case 10:A=M.h;t.imageStreams.push(A);UC(a);z=w.next();M.B(7);break;case 9:C=u(e),F=C.next();
case 11:if(F.done)return Vh(g.drm.clearKeys,t.variants),G=t.variants.some(function(R){if(R.audio)for(var V=u(R.audio.drmInfos),xa=V.next();!xa.done;xa=V.next())if(xa.value.licenseServerUri.startsWith("data:"))return!0;if(R.video)for(R=u(R.video.drmInfos),V=R.next();!V.done;V=R.next())if(V.value.licenseServerUri.startsWith("data:"))return!0;return!1}),K=g.offline.usePersistentLicense,G&&(K=!1),E(M,a.Ed(t,function(R){r=r||R},g,K),15);D=F.value;return E(M,WC(a,t,D.uri,D.language,D.kind,D.mime,D.codecs),
14);case 14:B=M.h;t.textStreams.push(B);UC(a);F=C.next();M.B(11);break;case 15:l=M.h;UC(a);if(r)throw r;return E(M,XC(t,l,g,K),16);case 16:return E(M,m.init(),17);case 17:return UC(a),E(M,aC(m),18);case 18:return n=M.h,UC(a),I=YC(l,t,b,c,g,h,K),J=I.Vl,L=I.ti,E(M,n.kb.addManifests([J]),19);case 19:N=M.h;UC(a);q=N[0];UC(a);if(r)throw r;return E(M,ZC(a,L,q,J,h,g,n.kb,t,l,K),20);case 20:return UC(a),$C(t,J,l,K),E(M,n.kb.updateManifest(q,J),21);case 21:return UC(a),P=new sC("manifest",n.path.$b,n.path.kb,
q),M.return(JC(P,J));case 3:return ya(M),E(M,m.destroy(),22);case 22:if(!k){M.B(23);break}return E(M,k.stop(),23);case 23:if(!l){M.B(25);break}return E(M,l.destroy(),25);case 25:za(M,0);break;case 2:O=va(M);if(q==null){M.B(27);break}return E(M,aD(q),27);case 27:throw r||O;}})}
function ZC(a,b,c,d,e,f,g,h,k,l){var m,n,q,r,t,v,w,z,y,A,C;return Q(function(F){switch(F.g){case 1:m={};n=0;q=function(){if(a.j.g||e.l)throw new U(2,9,7001);};r=function(D,B){var G,K,I,J,L,N,P,O,M;return Q(function(R){if(R.g==1){G=u(D);K=G.next();for(I={};!K.done;I={zc:void 0},K=G.next())I.zc=K.value,q(),J=EB(I.zc,f),L=I.zc.i,N=I.zc.h,P=function(V){return function(xa){var ba,Oa,Ha,Ia;return Q(function(Fa){switch(Fa.g){case 1:ba=V.zc.g;Oa=ba.kc(!1);if(!ba.aesKey||Oa){Fa.B(2);break}return E(Fa,Wm(xa,
ba.aesKey,V.zc.j),3);case 3:xa=Fa.h;case 2:return Ha=DB(ba),E(Fa,g.addSegments([{data:xa}]),4);case 4:Ia=Fa.h,q(),m[Ha]=Ia[0],n+=xa.byteLength,H(Fa)}})}}(I),O=I.zc.g,(M=O.kc(!1))?MB(e,I.zc.groupId,M,L,N,P):e.queue(I.zc.groupId,J,L,N,P);return E(R,NB(e),2)}q();if(!B||e.l)return R.B(0);$C(h,d,k,l);return E(R,g.updateManifest(c,d),0)})};t=!1;sa(F,2);if(!bD(h)||!t||cD(h)){F.B(4);break}return E(F,r(b.filter(function(D){return D.h}),!0),5);case 5:return q(),b=b.filter(function(D){return!D.h}),v=m,w=n,m=
{},n=0,E(F,dD(g,c,d,v,w,function(){return UC(a)}),6);case 6:q();case 4:if(t){F.B(7);break}return E(F,r(b,!1),8);case 8:return q(),z=m,y=n,m={},n=0,E(F,dD(g,c,d,z,y,function(){return q()}),9);case 9:q();case 7:ua(F,0);break;case 2:return A=va(F),C=Object.values(m),E(F,g.removeSegments(C,function(){}),10);case 10:throw A;}})}
function aD(a){var b,c,d,e;return Q(function(f){switch(f.g){case 1:return b=new ZB,E(f,b.init(),2);case 2:return E(f,aC(b),3);case 3:return c=f.h,d=new sC("manifest",c.path.$b,c.path.kb,a),E(f,b.destroy(),4);case 4:return e=new OC,E(f,e.remove(d.toString()),0)}})}
function dD(a,b,c,d,e,f){var g,h,k,l,m,n,q,r,t,v,w;return Q(function(z){switch(z.g){case 1:g=!1;sa(z,2);h=!0;k=u(c.streams);for(l=k.next();!l.done;l=k.next())for(m=l.value,n=u(m.segments),q=n.next();!q.done;q=n.next())r=q.value,t=r.pendingSegmentRefId?d[r.pendingSegmentRefId]:null,t!=null&&(r.dataKey=t,r.pendingSegmentRefId=void 0),t=r.pendingInitSegmentRefId?d[r.pendingInitSegmentRefId]:null,t!=null&&(r.initSegmentKey=t,r.pendingInitSegmentRefId=void 0),r.pendingSegmentRefId&&(h=!1),r.pendingInitSegmentRefId&&
(h=!1);c.size+=e;h&&(c.isIncomplete=!1);return E(z,a.updateManifest(b,c),4);case 4:g=!0;f();ua(z,0);break;case 2:return v=va(z),E(z,aD(b),5);case 5:if(g){z.B(6);break}w=Object.values(d);return E(z,a.removeSegments(w,function(){}),6);case 6:throw v;}})}
function XC(a,b,c,d){var e,f,g,h,k,l,m,n,q,r,t,v,w,z,y,A,C,F,D,B,G,K,I,J,L,N,P,O,M,R;return Q(function(V){switch(V.g){case 1:return e={width:Infinity,height:Infinity},Of(a,c.restrictions,e),E(V,Rf(b,a,d,c.drm.preferredKeySystems,c.drm.keySystemsMapping),2);case 2:f=[];g=c.preferredDecodingAttributes;h=c.preferredVideoCodecs;k=c.preferredAudioCodecs;l=c.preferredTextFormats;Mf(a,h,k,g,l);m=u(a.variants);for(n=m.next();!n.done;n=m.next())q=n.value,f.push(gg(q));r=u(a.textStreams);for(t=r.next();!t.done;t=
r.next())v=t.value,f.push(hg(v));w=u(a.imageStreams);for(z=w.next();!z.done;z=w.next())y=z.value,f.push(ig(y));return E(V,c.offline.trackSelectionCallback(f),3);case 3:A=V.h;C=a.presentationTimeline.getDuration();F=0;D=u(A);for(B=D.next();!B.done;B=D.next())G=B.value,K=G.bandwidth*C/8,F+=K;sa(V,4);return E(V,c.offline.downloadSizeCallback(F),6);case 6:I=V.h;if(!I)throw new U(2,9,9014);ua(V,5);break;case 4:J=va(V);if(J instanceof U)throw J;throw new U(2,9,9015);case 5:L=new Set;N=new Set;P=new Set;
O=u(A);for(M=O.next();!M.done;M=O.next())R=M.value,R.type=="variant"&&L.add(R.id),R.type=="text"&&N.add(R.id),R.type=="image"&&P.add(R.id);a.variants=a.variants.filter(function(xa){return L.has(xa.id)});a.textStreams=a.textStreams.filter(function(xa){return N.has(xa.id)});a.imageStreams=a.imageStreams.filter(function(xa){return P.has(xa.id)});eD(a);H(V)}})}
function YC(a,b,c,d,e,f,g){var h=HC(c,b,d),k=e.offline.progressCallback;KB(f,function(t,v){h.size=v;k(h,t)},function(t,v){l&&g&&m==v&&bi(a,"cenc",t)});var l=bD(b)&&!cD(b),m=null;l&&(m=fD.get(a.h.keySystem));for(var n=new KC,q=u(b.textStreams),r=q.next();!r.done;r=q.next())n.g.set(r.value.id,52);q=u(b.imageStreams);for(r=q.next();!r.done;r=q.next())MC(n,r.value);q=u(b.variants);for(r=q.next();!r.done;r=q.next())LC(n,r.value);f=gD(f,n,b,e);e=f.streams;f=f.ti;(n=a.h)&&g&&(n.initData=[]);return{Vl:{creationTime:Date.now(),
originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.qe(),streams:e,sessionIds:g?ki(a):[],drmInfo:n,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode,type:b.type},ti:f}}function bD(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
function cD(a){return a.variants.some(function(b){return(b.video?b.video.drmInfos:[]).concat(b.audio?b.audio.drmInfos:[]).some(function(c){return c.initData&&c.initData.length})})}function $C(a,b,c,d){b.expiration=c.qe();c=ki(c);b.sessionIds=d?c:[];if(bD(a)&&d&&!c.length)throw new U(2,9,9007);}p.remove=function(a){return hD(this,iD(this,a))};
function iD(a,b){var c,d,e,f,g,h;return Q(function(k){switch(k.g){case 1:SC();c=tC(b);if(c==null||c.g!="manifest")throw new U(2,9,9004,b);d=c;e=new ZB;ta(k,2);return E(k,e.init(),4);case 4:return E(k,cC(e,d.$b(),d.kb()),5);case 5:return f=k.h,E(k,f.getManifests([d.key()]),6);case 6:return g=k.h,h=g[0],E(k,Promise.all([jD(a,h,e),kD(f,d,h)]),2);case 2:return ya(k),E(k,e.destroy(),8);case 8:za(k,0)}})}
function lD(a,b){for(var c=[],d=u(a.streams),e=d.next();!e.done;e=d.next())e=e.value,b&&e.type=="video"?c.push({contentType:gf(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||e.type!="audio"||c.push({contentType:gf(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function jD(a,b,c){return Q(function(d){return E(d,mD(a.g,a.h.drm,c,b),0)})}
function kD(a,b,c){function d(){}var e=nD(c);JC(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}p.rm=function(){return hD(this,oD(this))};
function oD(a){var b,c,d,e,f,g,h,k,l,m;return Q(function(n){switch(n.g){case 1:return SC(),b=a.g,c=a.h.drm,d=new ZB,e=!1,ta(n,2),E(n,d.init(),4);case 4:f=[],dC(d,function(q){return f.push(q)}),g=u(f),h=g.next();case 5:if(h.done){n.B(2);break}k=h.value;return E(n,k.getAll(),8);case 8:return l=n.h,E(n,EC(c,b,l),9);case 9:return m=n.h,E(n,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();n.B(5);break;case 2:return ya(n),E(n,d.destroy(),11);case 11:za(n,3);break;case 3:return n.return(!e)}})}
p.list=function(){return hD(this,pD())};function pD(){var a,b,c;return Q(function(d){switch(d.g){case 1:return SC(),a=[],b=new ZB,ta(d,2),E(d,b.init(),4);case 4:return c=Promise.resolve(),bC(b,function(e,f){c=c.then(function(){var g;return Q(function(h){if(h.g==1)return E(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){k=JC(new sC("manifest",e.$b,e.kb,l),k);a.push(k)});H(h)})})}),E(d,c,2);case 2:return ya(d),E(d,b.destroy(),6);case 6:za(d,3);break;case 3:return d.return(a)}})}
function TC(a,b,c,d){var e,f,g,h,k;return Q(function(l){if(l.g==1)return e=null,f=a.g,g={networkingEngine:f,filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(m){e=m},isLowLatencyMode:function(){return!1},updateDuration:function(){},newDrmInfo:function(){},onManifestUpdated:function(){},getBandwidthEstimate:function(){return d.abr.defaultBandwidthEstimate},onMetadata:function(){},disableStream:function(){},
addFont:function(){}},c.configure(d.manifest),UC(a),E(l,c.start(b,g),2);if(l.g!=3)return h=l.h,UC(a),k=qD(h),E(l,Promise.all(nb(k,function(m){return m.createSegmentIndex()})),3);UC(a);if(e)throw e;return l.return(h)})}
function VC(a,b,c){var d,e,f,g,h,k,l,m,n,q,r,t,v,w,z;return Q(function(y){switch(y.g){case 1:return E(y,rD(a,b),2);case 2:d=y.h;if(d!="text/vtt")throw new U(1,2,2017,b);return E(y,sD(b,a.g,a.h.streaming.retryParameters),3);case 3:e=y.h;f=vf(d);if(!f)throw new U(2,2,2014,d);g=f();h={periodStart:0,segmentStart:0,segmentEnd:c.presentationTimeline.getDuration(),vttOffset:0};k=Lb(e);l=g.parseMedia(k,h,b,[]);m=[];n=u(l);q=n.next();for(r={};!q.done;r={xg:void 0,Gd:void 0},q=n.next())r.Gd=q.value,r.xg=null,
t=function(A){return function(){A.xg==null&&(A.xg=pc([b],[A.Gd.payload]));return A.xg||[]}}(r),v=new Jj(r.Gd.startTime,r.Gd.endTime,t,0,null,null,0,0,Infinity),r.Gd.payload.includes("#xywh")&&(w=r.Gd.payload.split("#xywh=")[1].split(","),w.length===4&&v.lg({height:parseInt(w[3],10),positionX:parseInt(w[0],10),positionY:parseInt(w[1],10),width:parseInt(w[2],10)})),m.push(v);z=d;if(!m.length){y.B(4);break}return E(y,bp(m[0].S()[0],a.g,a.h.manifest.retryParameters),5);case 5:z=y.h;case 4:return y.return({id:a.m++,
originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new mm(m),mimeType:z||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:"image",primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,tilesLayout:"1x1",accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([gf(z||
"","")]),isAudioMuxedInVideo:!1,baseOriginalId:null})}})}
function WC(a,b,c,d,e,f,g){var h,k,l;return Q(function(m){if(m.g==1)return f?m.B(2):E(m,rD(a,c),3);m.g!=2&&(f=m.h);h={id:a.m++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:om(0,b.presentationTimeline.getDuration(),[c]),mimeType:f||"",codecs:g||"",kind:e,encrypted:!1,drmInfos:[],keyIds:new Set,language:d,originalLanguage:d,label:null,type:vc,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,
audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([gf(f||"",g||"")]),isAudioMuxedInVideo:!1,baseOriginalId:null};k=gf(h.mimeType,h.codecs);l=wf(k);if(!l)throw new U(2,2,2014,f);return m.return(h)})}
function rD(a,b){var c;return Q(function(d){switch(d.g){case 1:return sa(d,2),E(d,bp(b,a.g,a.h.streaming.retryParameters),4);case 4:c=d.h;ua(d,3);break;case 2:va(d);case 3:if(c)return d.return(c);throw new U(1,2,2011,b);}})}function sD(a,b,c){var d,e,f;return Q(function(g){if(g.g==1)return d=ph,e=jh([a],c),e.method="GET",E(g,b.request(d,e).promise,2);f=g.h;return g.return(f.data)})}
p.Ed=function(a,b,c,d){var e=this,f;return Q(function(g){return g.g==1?(f=new Lh({Fc:e.g,onError:b,Uf:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),f.configure(c.drm),E(g,Qh(f,a.variants,d),2)):g.g!=3?E(g,di(f),3):g.return(f)})};
function gD(a,b,c,d){var e=new Map,f=qD(c),g=new Map;f=u(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=tD(a,b,c,h,d,e);g.set(h.id,k)}a=u(c.variants);for(b=a.next();!b.done;b=a.next())b=b.value,b.audio&&g.get(b.audio.id).variantIds.push(b.id),b.video&&g.get(b.video.id).variantIds.push(b.id);return{streams:Array.from(g.values()),ti:Array.from(e.values())}}
function tD(a,b,c,d,e,f){var g={id:d.id,originalId:d.originalId,groupId:d.groupId,primary:d.primary,type:d.type,mimeType:d.mimeType,codecs:d.codecs,frameRate:d.frameRate,pixelAspectRatio:d.pixelAspectRatio,hdr:d.hdr,colorGamut:d.colorGamut,videoLayout:d.videoLayout,kind:d.kind,language:d.language,originalLanguage:d.originalLanguage,label:d.label,width:d.width||null,height:d.height||null,encrypted:d.encrypted,keyIds:d.keyIds,segments:[],variantIds:[],roles:d.roles,forced:d.forced,channelsCount:d.channelsCount,
audioSamplingRate:d.audioSamplingRate,spatialAudio:d.spatialAudio,closedCaptions:d.closedCaptions,tilesLayout:d.tilesLayout,mssPrivateData:d.mssPrivateData,external:d.external,fastSwitching:d.fastSwitching,isAudioMuxedInVideo:d.isAudioMuxedInVideo},h=e.offline.numberOfParallelDownloads,k=h===0?d.id:0;uD(d,c.presentationTimeline.Pb(),function(l,m){var n=DB(l),q=void 0;if(!f.has(n)){var r=l.endTime-l.startTime;r=NC(b,d.id)*r;r=GB(a.g,r);f.set(n,new CB(l,r,k,!1,m))}l.ia&&(q=DB(l.ia),f.has(q)||(r=NC(b,
d.id)*.5,r=GB(a.g,r),f.set(q,new CB(l.ia,r,k,!0,m))));g.segments.push({pendingInitSegmentRefId:q,initSegmentKey:q?0:null,startTime:l.startTime,endTime:l.endTime,appendWindowStart:l.appendWindowStart,appendWindowEnd:l.appendWindowEnd,timestampOffset:l.timestampOffset,tilesLayout:l.tilesLayout,pendingSegmentRefId:n,dataKey:0,mimeType:l.mimeType,codecs:l.codecs,thumbnailSprite:l.thumbnailSprite});h!==0&&(k=(k+1)%h)});return g}
function uD(a,b,c){b=a.segmentIndex.find(b);if(b!=null)for(var d=a.segmentIndex.get(b);d;)c(d,b),d=a.segmentIndex.get(++b)}function UC(a){if(a.j.g)throw new U(2,9,7001);}function SC(){if(!PC())throw new U(2,9,9E3);}function hD(a,b){return Q(function(c){if(c.g==1)return a.i.push(b),ta(c,2),E(c,b,4);if(c.g!=2)return c.return(c.h);ya(c);Tc(a.i,b);return za(c,0)})}function RC(a,b){var c=b.promise;a.i.push(c);return b.finally(function(){Tc(a.i,c)})}
function nD(a){var b=new Set;a=u(a.streams);for(var c=a.next();!c.done;c=a.next()){c=u(c.value.segments);for(var d=c.next();!d.done;d=c.next())d=d.value,d.initSegmentKey!=null&&b.add(d.initSegmentKey),b.add(d.dataKey)}return Array.from(b)}
function mD(a,b,c,d){var e,f,g;return Q(function(h){if(h.g==1){if(!d.drmInfo)return h.return();e=eC(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:lD(d,!1),videoCapabilities:lD(d,!0)}});return E(h,EC(b,a,f),2)}return h.g!=3?(g=h.h,E(h,e.remove(g),3)):E(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})}
function qD(a){for(var b=new Set,c=u(a.variants),d=c.next();!d.done;d=c.next())d=d.value,d.audio&&b.add(d.audio),d.video&&b.add(d.video);c=u(a.textStreams);for(d=c.next();!d.done;d=c.next())b.add(d.value);a=u(a.imageStreams);for(c=a.next();!c.done;c=a.next())b.add(c.value);return b}
function eD(a){a.variants.map(function(f){return f.video});var b=new Set(a.variants.map(function(f){return f.audio}));a=a.textStreams;for(var c=u(b),d=c.next();!d.done;d=c.next()){d=u(b);for(var e=d.next();!e.done;e=d.next());}b=u(a);for(c=b.next();!c.done;c=b.next())for(c=u(a),d=c.next();!d.done;d=c.next());}S("shaka.offline.Storage",OC);OC.deleteAll=function(){var a;return Q(function(b){return b.g==1?(a=new ZB,ta(b,2),E(b,fC(a),2)):b.g!=5?(ya(b),E(b,a.destroy(),5)):za(b,0)})};
OC.prototype.list=OC.prototype.list;OC.prototype.removeEmeSessions=OC.prototype.rm;OC.prototype.remove=OC.prototype.remove;OC.prototype.store=OC.prototype.store;OC.prototype.getNetworkingEngine=OC.prototype.Xb;OC.prototype.getConfiguration=OC.prototype.getConfiguration;OC.prototype.configure=OC.prototype.configure;OC.prototype.destroy=OC.prototype.destroy;OC.support=PC;
var fD=(new Map).set("org.w3.clearkey","1077efecc0b24d02ace33c1e52e2fb4b").set("com.widevine.alpha","edef8ba979d64acea3c827dcd51d21ed").set("com.microsoft.playready","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.recommendation","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.software","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.hardware","9a04f07998404286ab92e65be0885f95").set("com.huawei.wiseplay","3d5e6d359b9a41e8b843dd3c6e72c42c");
nr("offline",PC);function vD(){}function wD(){for(var a=u(xD),b=a.next();!b.done;b=a.next()){b=b.value;try{b.callback()}catch(c){bb("Error installing polyfill!",c)}}}function yD(a,b){a={priority:b||0,callback:a};for(b=0;b<xD.length;b++)if(xD[b].priority<a.priority){xD.splice(b,0,a);return}xD.push(a)}S("shaka.polyfill",vD);vD.register=yD;vD.installAll=wD;var xD=[];function zD(){}function AD(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=u(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())BD(b.value)}function BD(a){var b="aria-"+a.toLowerCase().replace(/^aria/,"");Object.defineProperty(Element.prototype,a,{get:function(){return this.getAttribute(b)},set:function(c){c==null||c==void 0?this.removeAttribute(b):this.setAttribute(b,c)}})}vD.Aria=zD;zD.install=AD;yD(AD);function CD(a,b,c){this.g=a;this.i=b||null;this.h=c||null;this.keySystem=a.keySystem}CD.prototype.getConfiguration=function(){var a=this.g.getConfiguration();if(a.videoCapabilities)for(var b=u(a.videoCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.i;if(a.audioCapabilities)for(b=u(a.audioCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.h;return a};CD.prototype.createMediaKeys=function(){return this.g.createMediaKeys()};function DD(a){if(a.startsWith("com.apple"))return"cbcs";if(a.startsWith("com.widevine")||a.startsWith("com.microsoft")||a.startsWith("com.chromecast")||a.startsWith("org.w3")||a.startsWith("com.huawei"))return"cenc";bb("EmeEncryptionSchemePolyfill: Unknown key system:",a,"Please contribute!");return null}
function ED(a){if(!a)return!1;a=a.getConfiguration();var b=a.audioCapabilities&&a.audioCapabilities[0];return(a=a.videoCapabilities&&a.videoCapabilities[0]||b)&&a.encryptionScheme!==void 0?!0:!1}function FD(a,b){return!a||a==b||(a=="cbcs"||a=="cbcs-1-9")&&Tb().vd()?!0:!1};function GD(){}var HD;function ID(){Tb().og()&&!HD&&!navigator.emeEncryptionSchemePolyfilled&&navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration&&(HD=navigator.requestMediaKeySystemAccess,navigator.requestMediaKeySystemAccess=JD,navigator.emeEncryptionSchemePolyfilled=!0)}
function JD(a,b){var c=this,d,e;return Q(function(f){if(f.g==1)return E(f,HD.call(c,a,b),2);d=f.h;if(e=ED(d))return navigator.requestMediaKeySystemAccess=HD,f.return(d);navigator.requestMediaKeySystemAccess=KD;return f.return(KD.call(c,a,b))})}
function KD(a,b){var c=this,d,e,f,g,h,k,l,m,n,q,r,t;return Q(function(v){if(v.g==1){d=DD(a);e=[];f=u(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=LD(h.videoCapabilities,d),l=LD(h.audioCapabilities,d),h.videoCapabilities&&h.videoCapabilities.length&&!k.length||h.audioCapabilities&&h.audioCapabilities.length&&!l.length||(m=Object.assign({},h),m.videoCapabilities=k,m.audioCapabilities=l,e.push(m));if(!e.length)throw n=Error("Unsupported keySystem or supportedConfigurations."),n.name="NotSupportedError",
n.code=DOMException.NOT_SUPPORTED_ERR,n;return E(v,HD.call(c,a,e),2)}q=v.h;t=r=null;e[0]&&(e[0].videoCapabilities&&(r=e[0].videoCapabilities[0].encryptionScheme),e[0].audioCapabilities&&(t=e[0].audioCapabilities[0].encryptionScheme));return v.return(new CD(q,r,t))})}function LD(a,b){return a?a.filter(function(c){return FD(c.encryptionScheme,b)}):a}vD.EmeEncryptionScheme=GD;GD.install=ID;yD(ID);function MD(){}
function ND(){if(window.Document){var a=Element.prototype;a.requestFullscreen=a.requestFullscreen||a.mozRequestFullScreen||a.msRequestFullscreen||a.webkitRequestFullscreen;a=Document.prototype;a.exitFullscreen=a.exitFullscreen||a.mozCancelFullScreen||a.msExitFullscreen||a.webkitCancelFullScreen;"fullscreenElement"in document||(Object.defineProperty(document,"fullscreenElement",{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement||document.webkitFullscreenElement}}),
Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",OD);document.addEventListener("webkitfullscreenerror",OD);document.addEventListener("mozfullscreenchange",OD);document.addEventListener("mozfullscreenerror",OD);document.addEventListener("MSFullscreenChange",OD);document.addEventListener("MSFullscreenError",OD)}}
function OD(a){var b=a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase(),c=document.createEvent("Event");c.initEvent(b,a.bubbles,a.cancelable);a.target.dispatchEvent(c)}vD.Fullscreen=MD;MD.install=ND;yD(ND);function PD(){}var QD;function RD(){Tb().og()&&!QD&&!navigator.mediaCapabilitiesEncryptionSchemePolyfilled&&navigator.mediaCapabilities&&(QD=navigator.mediaCapabilities.decodingInfo,navigator.mediaCapabilities.decodingInfo=SD,navigator.mediaCapabilitiesEncryptionSchemePolyfilled=!0)}
function SD(a){var b=this,c,d,e;return Q(function(f){switch(f.g){case 1:return E(f,QD.call(b,a),2);case 2:c=f.h;if(!c.supported||!a.keySystemConfiguration)return f.return(c);d=c.keySystemAccess;if(e=ED(d))return navigator.mediaCapabilities.decodingInfo=QD,f.return(c);navigator.mediaCapabilities.decodingInfo=TD;if(d){f.B(3);break}return E(f,UD(a),4);case 4:return c.keySystemAccess=f.h,f.return(c);case 3:return f.return(TD.call(b,a))}})}
function TD(a){var b=this,c,d,e,f,g,h,k;return Q(function(l){switch(l.g){case 1:return d=c=null,!a.keySystemConfiguration||(e=a.keySystemConfiguration,f=e.keySystem,d=e.audio&&e.audio.encryptionScheme,c=e.video&&e.video.encryptionScheme,g=DD(f),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},FD(d,g)&&FD(c,g))?E(l,QD.call(b,a),2):l.return(h);case 2:k=l.h;if(k.keySystemAccess){k.keySystemAccess=new CD(k.keySystemAccess,c,d);l.B(3);break}if(!a.keySystemConfiguration){l.B(3);
break}return E(l,UD(a),5);case 5:k.keySystemAccess=l.h;case 3:return l.return(k)}})}
function UD(a){var b,c;return Q(function(d){if(d.g==1){var e=a.keySystemConfiguration,f=[],g=[];e.audio&&f.push({robustness:e.audio.robustness||"",contentType:a.audio.contentType,encryptionScheme:e.audio.encryptionScheme});e.video&&g.push({robustness:e.video.robustness||"",contentType:a.video.contentType,encryptionScheme:e.video.encryptionScheme});e={initDataTypes:e.initDataType?[e.initDataType]:[],distinctiveIdentifier:e.distinctiveIdentifier,persistentState:e.persistentState,sessionTypes:e.sessionTypes};
f.length&&(e.audioCapabilities=f);g.length&&(e.videoCapabilities=g);b=e;return E(d,navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d.return(c)})}vD.MCapEncryptionScheme=PD;PD.install=RD;yD(RD,-2);function VD(){}function WD(){Tb().qc()||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),VD.originalMcap=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=XD)}
function XD(a){var b,c,d,e,f,g,h,k,l,m,n;return Q(function(q){switch(q.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};Tb();c=a.video;d=a.audio;if(a.type!="media-source"){if(a.type=="file"){if(c&&(e=c.contentType,f=Ri().canPlayType(e)!="",!f)||d&&(g=d.contentType,h=Ri().canPlayType(g)!="",!h))return q.return(b)}else return q.return(b);q.B(2);break}if(!Qi())return q.return(b);if(!c){q.B(3);break}return E(q,YD(c),4);case 4:if(k=q.h,!k)return q.return(b);case 3:if(d){var r=
Tb().Oa(),t=d.contentType;r==="CAST"&&d.spatialRendering&&(t+="; spatialRendering=true");l=jd(t);if(!l)return q.return(b)}case 2:if(!a.keySystemConfiguration)return b.supported=!0,q.return(b);m=a.keySystemConfiguration;return E(q,ZD(c,d,m),6);case 6:if(n=q.h)b.supported=!0,b.keySystemAccess=n;case 5:return q.return(b)}})}function YD(a){var b,c,d;return Q(function(e){return e.g==1?(b=Tb(),c=b.Oa(),c!=="CAST"?e.B(2):E(e,$D(a),3)):e.g!=2?(d=e.h,e.return(d)):e.return(jd(a.contentType))})}
function ZD(a,b,c){var d,e,f,g,h,k,l,m,n,q,r;return Q(function(t){switch(t.g){case 1:d=[];e=[];c.audio&&(f={robustness:c.audio.robustness||"",contentType:b.contentType},Tb().qj()&&b.contentType.includes('codecs="ac-3"')&&(f.contentType='audio/mp4; codecs="ec-3"'),c.audio.encryptionScheme&&(f.encryptionScheme=c.audio.encryptionScheme),d.push(f));c.video&&(g={robustness:c.video.robustness||"",contentType:a.contentType},c.video.encryptionScheme&&(g.encryptionScheme=c.video.encryptionScheme),e.push(g));
h={initDataTypes:[c.initDataType],distinctiveIdentifier:c.distinctiveIdentifier,persistentState:c.persistentState,sessionTypes:c.sessionTypes};d.length&&(h.audioCapabilities=d);e.length&&(h.videoCapabilities=e);k=a?a.contentType:"";l=b?b.contentType:"";m=pf(k)+";"+of(k);n=pf(l)+";"+of(l);q=c.keySystem;r=null;sa(t,2);if(Jg.has(m+"#"+n+"#"+q)){r=Jg.get(m+"#"+n+"#"+q)||null;t.B(4);break}return E(t,navigator.requestMediaKeySystemAccess(c.keySystem,[h]),5);case 5:r=t.h,Jg.set(m+"#"+n+"#"+q,r);case 4:ua(t,
3);break;case 2:va(t);case 3:return t.return(r)}})}
function $D(a){var b,c,d,e,f;return Q(function(g){if(g.g==1){if(!(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType))return g.return(jd(a.contentType));b=a.contentType;a.width&&a.height&&a.width>1280&&a.height>720&&(b+="; width="+a.width+"; height="+a.height);a.framerate&&(c=Math.round(a.framerate),c<24||c>30)&&(b+="; framerate="+a.framerate);d=a.transferFunction||"";switch(d){case "":case "srgb":break;case "pq":b+="; eotf=smpte2084";break;case "hlg":b+="; eotf=arib-std-b67";break;
default:return g.return(!1)}e=!1;f=aE;return f.has(b)?(e=f.get(b),g.B(2)):E(g,cast.__platform__.canDisplayType(b),3)}g.g!=2&&(e=g.h,f.set(b,e));return g.return(e)})}vD.MediaCapabilities=VD;VD.install=WD;VD.originalMcap=null;var aE=new Map;yD(WD,-1);function bE(){}function cE(){var a=Tb(),b=a.Ja()==="WEBKIT"?a.Ga():null;(window.MediaSource||window.ManagedMediaSource)&&b&&window.MediaSource&&(b<=12?(dE(),eE()):b<=15&&dE());a=u(a.Dj());for(b=a.next();!b.done;b=a.next())fE(b.value);(window.MediaSource||window.ManagedMediaSource)&&gE();window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&hE()}
function dE(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Na.apply(0,arguments));b.abort=function(){};return b}}function eE(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}
function gE(){if(window.MediaSource){var a=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(c){return lf(c)!="mp2t"&&a(c)}}if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(c){return lf(c)!="mp2t"&&b(c)}}}
function fE(a){var b=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(d){return of(d)!=a&&b(d)};if(window.ManagedMediaSource){var c=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(d){return of(d)!=a&&c(d)}}}
function hE(){var a=MediaSource.isTypeSupported;Tb().ek()&&(MediaSource.isTypeSupported=function(b){var c=b.split(/ *; */),d=c.findIndex(function(g){return g.startsWith("codecs=")});if(d<0)return a(b);var e=c[d].replace("codecs=","").replace(/"/g,"").split(/\s*,\s*/),f=e.findIndex(function(g){return g.startsWith("vp09")});f>=0&&(e[f]="vp9",c[d]='codecs="'+e.join(",")+'"',b=c.join("; "));return a(b)})}vD.MediaSource=bE;bE.install=cE;yD(cE);function iE(){}function jE(){screen.orientation&&screen.orientation.unlock||(screen.orientation!=void 0?kE():window.orientation!=void 0&&lE())}function kE(){screen.orientation.lock===void 0&&(screen.orientation.lock=function(){return Promise.resolve()});screen.orientation.unlock===void 0&&(screen.orientation.unlock=function(){})}
function lE(){function a(){switch(window.orientation){case -90:b.type="landscape-secondary";b.angle=270;break;case 0:b.type="portrait-primary";b.angle=0;break;case 90:b.type="landscape-primary";b.angle=90;break;case 180:b.type="portrait-secondary",b.angle=180}}var b=new mE;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new T("change");b.dispatchEvent(c)})}vD.Orientation=iE;iE.install=jE;function mE(){mb.call(this);this.type="";this.angle=0}ma(mE,mb);
mE.prototype.lock=function(a){function b(d){return screen.lockOrientation?screen.lockOrientation(d):screen.mozLockOrientation?screen.mozLockOrientation(d):screen.msLockOrientation?screen.msLockOrientation(d):!1}var c=!1;switch(a){case "natural":c=b("default");break;case "any":c=!0;this.unlock();break;default:c=b(a)}if(c)return Promise.resolve();a=Error("screen.orientation.lock() is not available on this device");a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;return Promise.reject(a)};
mE.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};yD(jE);function nE(){}var oE,pE,qE,rE,sE,tE;
function uE(a){if(window.HTMLVideoElement&&window.WebKitMediaKeys&&window.shakaMediaKeysPolyfill!=vE){if(a===void 0?0:a)oE=!0,pE=Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"mediaKeys"),qE=HTMLMediaElement.prototype.setMediaKeys,rE=window.MediaKeys,sE=window.MediaKeySystemAccess,tE=navigator.requestMediaKeySystemAccess;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=wE;window.MediaKeys=xE;window.MediaKeySystemAccess=
yE;navigator.requestMediaKeySystemAccess=zE;window.shakaMediaKeysPolyfill=vE;Zf.clear();Jg.clear()}}function zE(a,b){try{var c=new yE(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function wE(a){var b=this.mediaKeys;b&&b!=a&&AE(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?AE(a,this):Promise.resolve()}
function BE(a){a=Lb(a.initData);if(Pb(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=Zb(a.subarray(4),!0);a=bc(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=Mb(a);this.dispatchEvent(b)}vD.PatchedMediaKeysApple=nE;
nE.uninstall=function(){window.shakaMediaKeysPolyfill==vE&&oE&&(oE=!1,Object.defineProperty(HTMLMediaElement.prototype,"mediaKeys",pE),HTMLMediaElement.prototype.setMediaKeys=qE,window.MediaKeys=rE,window.MediaKeySystemAccess=sE,navigator.requestMediaKeySystemAccess=tE,pE=tE=qE=sE=rE=null,window.shakaMediaKeysPolyfill="",Zf.clear(),Jg.clear())};nE.install=uE;
function yE(a,b){this.keySystem=a;if(a.startsWith("com.apple.fps"))for(a=u(b),b=a.next();!b.done;b=a.next()){var c=b.value;if(c.persistentState=="required")b=null;else{b={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:c.initDataTypes,sessionTypes:["temporary"],label:c.label};var d=!1,e=!1;if(c.audioCapabilities)for(var f=u(c.audioCapabilities),g=f.next();!g.done;g=f.next())g=g.value,g.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,
g.contentType.split(";")[0])&&(b.audioCapabilities.push(g),e=!0));if(c.videoCapabilities)for(c=u(c.videoCapabilities),f=c.next();!f.done;f=c.next())f=f.value,f.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,f.contentType.split(";")[0])&&(b.videoCapabilities.push(f),e=!0));d||(e=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));b=e?b:null}if(b){this.g=b;return}}a=Error("Unsupported keySystem");a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}
yE.prototype.createMediaKeys=function(){var a=new xE(this.keySystem);return Promise.resolve(a)};yE.prototype.getConfiguration=function(){return this.g};function xE(a){this.h=new WebKitMediaKeys(a);this.g=new Wc}xE.prototype.createSession=function(a){a=a||"temporary";if(a!="temporary")throw new TypeError("Session type "+a+" is unsupported on this platform.");return new CE(this.h,a)};xE.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
function AE(a,b){a.g.Sa();if(!b)return Promise.resolve();a.g.o(b,"webkitneedkey",BE);try{return Wl(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}xE.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function CE(a){mb.call(this);this.i=null;this.l=a;this.g=this.h=null;this.j=new Wc;this.sessionId="";this.expiration=NaN;this.closed=new Kg;this.keyStatuses=new DE;this.onkeystatuseschange=null}
ma(CE,mb);p=CE.prototype;
p.generateRequest=function(a,b){var c=this;this.h=new Kg;try{var d=this.l.createSession("video/mp4",Lb(b));this.i=d;this.sessionId=d.sessionId||"";this.j.o(this.i,"webkitkeymessage",function(e){c.h&&(c.h.resolve(),c.h=null);e=(new Map).set("messageType",c.keyStatuses.Vc()==void 0?"license-request":"license-renewal").set("message",Mb(e.message));e=new T("message",e);c.dispatchEvent(e)});this.j.o(d,"webkitkeyadded",function(){c.g&&(EE(c,"usable"),c.g.resolve(),c.g=null)});this.j.o(d,"webkitkeyerror",
function(){var e=Error("EME PatchedMediaKeysApple key error");e.errorCode=c.i.error;if(c.h!=null)c.h.reject(e),c.h=null;else if(c.g!=null)c.g.reject(e),c.g=null;else switch(c.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:EE(c,"output-not-allowed");break;default:EE(c,"internal-error")}});EE(this,"status-pending")}catch(e){this.h.reject(e)}return this.h};p.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
p.update=function(a){this.g=new Kg;try{this.i.update(Lb(a))}catch(b){this.g.reject(b)}return this.g};p.close=function(){try{this.i.close(),this.closed.resolve(),this.j.Sa()}catch(a){this.closed.reject(a)}return this.closed};p.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};
function EE(a,b){var c=a.keyStatuses;c.size=b==void 0?0:1;c.g=b;b=new T("keystatuseschange");a.dispatchEvent(b);if(a.onkeystatuseschange)a.onkeystatuseschange(b)}function DE(){this.size=0;this.g=void 0}p=DE.prototype;p.Vc=function(){return this.g};p.forEach=function(a){this.g&&a(this.g,Ig.value())};p.get=function(a){if(this.has(a))return this.g};p.has=function(a){var b=Ig.value();return this.g&&Kb(a,b)?!0:!1};p.entries=function(){};p.keys=function(){};p.values=function(){};var vE="apple";
yD(function(){window.HTMLVideoElement&&window.WebKitMediaKeys&&(navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||uE())});function FE(){}function GE(){if(window.MediaKeys){var a=Tb();MediaKeys.prototype.setServerCertificate&&a.Me()||(MediaKeys.prototype.setServerCertificate=HE)}}function HE(){return Promise.resolve(!1)}vD.PatchedMediaKeysCert=FE;FE.install=GE;yD(GE);function IE(){}
function JE(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)KE="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=LE;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=ME;window.MediaKeys=NE;window.MediaKeySystemAccess=OE;window.shakaMediaKeysPolyfill=PE}}
function QE(a){var b=KE;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function LE(a,b){try{var c=new OE(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function ME(a){var b=this.mediaKeys;b&&b!=a&&RE(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&RE(a,this);return Promise.resolve()}vD.PatchedMediaKeysWebkit=IE;IE.install=JE;
function OE(a,b){this.g=this.keySystem=a;var c=!1;a=="org.w3.clearkey"&&(this.g="webkit-org.w3.clearkey",c=!1);var d=!1;var e=document.getElementsByTagName("video");e=e.length?e[0]:document.createElement("video");b=u(b);for(var f=b.next();!f.done;f=b.next()){f=f.value;var g={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:f.initDataTypes,sessionTypes:["temporary"],label:f.label},h=!1;if(f.audioCapabilities)for(var k=u(f.audioCapabilities),
l=k.next();!l.done;l=k.next())l=l.value,l.contentType&&(h=!0,e.canPlayType(l.contentType.split(";")[0],this.g)&&(g.audioCapabilities.push(l),d=!0));if(f.videoCapabilities)for(k=u(f.videoCapabilities),l=k.next();!l.done;l=k.next())l=l.value,l.contentType&&(h=!0,e.canPlayType(l.contentType,this.g)&&(g.videoCapabilities.push(l),d=!0));h||(d=e.canPlayType("video/mp4",this.g)||e.canPlayType("video/webm",this.g));f.persistentState=="required"&&(c?(g.persistentState="required",g.sessionTypes=["persistent-license"]):
d=!1);if(d){this.h=g;return}}c="Unsupported keySystem";if(a=="org.w3.clearkey"||a=="com.widevine.alpha")c="None of the requested configurations were supported.";a=Error(c);a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}OE.prototype.createMediaKeys=function(){var a=new NE(this.g);return Promise.resolve(a)};OE.prototype.getConfiguration=function(){return this.h};function NE(a){this.l=a;this.h=null;this.g=new Wc;this.i=[];this.j=new Map}
function RE(a,b){a.h=b;a.g.Sa();var c=KE;b&&(a.g.o(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Mb(d.initData);a.h.dispatchEvent(e)}),a.g.o(b,c+"keymessage",function(d){var e=SE(a,d.sessionId);e&&(d=(new Map).set("messageType",e.keyStatuses.Vc()==void 0?"licenserequest":"licenserenewal").set("message",d.message),d=new T("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.o(b,c+"keyadded",function(d){(d=SE(a,d.sessionId))&&d.ready()}),
a.g.o(b,c+"keyerror",function(d){var e=SE(a,d.sessionId);if(e){var f=Error("EME v0.1b key error"),g=d.errorCode;g.systemCode=d.systemCode;f.errorCode=g;!d.sessionId&&e.h?(d.systemCode==45&&(f.message="Unsupported session type."),e.h.reject(f),e.h=null):d.sessionId&&e.g?(e.g.reject(f),e.g=null):(f=d.systemCode,d.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?TE(e,"output-restricted"):f==1?TE(e,"expired"):TE(e,"internal-error"))}}))}
NE.prototype.createSession=function(a){a=a||"temporary";if(a!="temporary"&&a!="persistent-license")throw new TypeError("Session type "+a+" is unsupported on this platform.");var b=this.h||document.createElement("video");b.src||(b.src="about:blank");a=new UE(b,this.l,a);this.i.push(a);return a};NE.prototype.setServerCertificate=function(){return Promise.resolve(!1)};NE.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};
function SE(a,b){var c=a.j.get(b);return c?c:(c=a.i.shift())?(c.sessionId=b,a.j.set(b,c),c):null}function UE(a,b,c){mb.call(this);this.j=a;this.m=!1;this.g=this.h=null;this.i=b;this.l=c;this.sessionId="";this.expiration=NaN;this.closed=new Kg;this.keyStatuses=new VE;this.onkeystatuseschange=null}ma(UE,mb);p=UE.prototype;p.ready=function(){TE(this,"usable");this.g&&this.g.resolve();this.g=null};
function WE(a,b,c){if(a.m)return Promise.reject(Error("The session is already initialized."));a.m=!0;try{if(a.l=="persistent-license")if(c)var d=Lb(bc("LOAD_SESSION|"+c));else{var e=bc("PERSISTENT|");d=oc(e,b)}else d=Lb(b)}catch(g){return Promise.reject(g)}a.h=new Kg;var f=QE("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if(g.name!="InvalidStateError")return a.h=null,Promise.reject(g);(new Gf(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).Y(.01)}return a.h}
function XE(a,b,c){if(a.g)a.g.then(function(){return XE(a,b,c)}).catch(function(){return XE(a,b,c)});else{a.g=b;if(a.i=="webkit-org.w3.clearkey"){var d=Yb(c);var e=JSON.parse(d);e.keys[0].kty!="oct"&&(a.g.reject(Error("Response is not a valid JSON Web Key Set.")),a.g=null);d=lc(e.keys[0].k);e=lc(e.keys[0].kid)}else d=Lb(c),e=null;var f=QE("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
function TE(a,b){var c=a.keyStatuses;c.size=b==void 0?0:1;c.g=b;b=new T("keystatuseschange");a.dispatchEvent(b);if(a.onkeystatuseschange)a.onkeystatuseschange(b)}p.generateRequest=function(a,b){return WE(this,b,null)};p.load=function(a){return this.l=="persistent-license"?WE(this,null,a):Promise.reject(Error("Not a persistent session."))};p.update=function(a){var b=new Kg;XE(this,b,a);return b};
p.close=function(){if(this.l!="persistent-license"){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=QE("cancelKeyRequest");try{this.j[a](this.i,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed};p.remove=function(){return this.l!="persistent-license"?Promise.reject(Error("Not a persistent session.")):this.close()};function VE(){this.size=0;this.g=void 0}p=VE.prototype;p.Vc=function(){return this.g};
p.forEach=function(a){this.g&&a(this.g,Ig.value())};p.get=function(a){if(this.has(a))return this.g};p.has=function(a){var b=Ig.value();return this.g&&Kb(a,b)?!0:!1};p.entries=function(){};p.keys=function(){};p.values=function(){};var KE="",PE="webkit";yD(JE);function YE(){}function ZE(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=$E,Object.defineProperty(a,"disablePictureInPicture",{get:aF,set:bF,enumerable:!0,configurable:!0}),document.exitPictureInPicture=cF,document.addEventListener("webkitpresentationmodechanged",dF,!0))}}
function dF(a){a=a.target;if(a.webkitPresentationMode=="picture-in-picture"){document.pictureInPictureElement=a;var b=new Event("enterpictureinpicture");a.dispatchEvent(b)}else document.pictureInPictureElement==a&&(document.pictureInPictureElement=null),b=new Event("leavepictureinpicture"),a.dispatchEvent(b)}
function $E(){return this.webkitSupportsPresentationMode("picture-in-picture")?(this.webkitSetPresentationMode("picture-in-picture"),document.pictureInPictureElement=this,Promise.resolve()):Promise.reject(Error("PiP not allowed by video element"))}function cF(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
function aF(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function bF(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}vD.PiPWebkit=YE;YE.install=ZE;yD(ZE);function eF(){}function fF(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=gF))}function gF(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}vD.RandomUUID=eF;eF.install=fF;yD(fF);function hF(){}function iF(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:jF})}function jF(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}vD.Symbol=hF;hF.install=iF;yD(iF);function kF(){}function lF(){for(var a=u([Uint8Array,Uint8ClampedArray,Uint16Array,Uint32Array,Int8Array,Int16Array,Int32Array,Float32Array,Float64Array]),b=a.next();!b.done;b=a.next())b=b.value,b.prototype.indexOf||(b.prototype.indexOf=mF),b.prototype.lastIndexOf||(b.prototype.lastIndexOf=nF),b.prototype.includes||(b.prototype.includes=oF)}function mF(a,b){return Array.prototype.indexOf.call(this,a,b)}function nF(a,b){return Array.prototype.lastIndexOf.call(this,a,b)}
function oF(a,b){return this.indexOf(a,b)!==-1}vD.TypedArray=kF;kF.install=lF;yD(lF);function pF(){}function qF(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b.catch(function(){});return b}}}vD.VideoPlayPromise=pF;pF.install=qF;yD(qF);function rF(){}function sF(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||typeof Ri().webkitDroppedFrameCount==="number")&&(a.getVideoPlaybackQuality=tF)}}function tF(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}vD.VideoPlaybackQuality=rF;rF.install=sF;yD(sF);function uF(){}function vF(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(b==3)a=wF;else if(b==6)a=xF;else{try{var c=!!wF(1,2,"")}catch(d){c=!1}c&&(a=wF)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function wF(a,b,c){return new window.TextTrackCue(a,b,c)}function xF(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}vD.VTTCue=uF;uF.install=vF;yD(vF);function yF(a){mb.call(this);this.g=a;this.m=null;this.h=[];this.j=-1;this.i=this.l=null;this.u=new Wc}ma(yF,mb);p=yF.prototype;p.destroy=function(){var a=this;return Q(function(b){if(b.g==1)return E(b,a.removeAllItems(),2);a.g=null;a.u&&(a.u.release(),a.u=null);mb.prototype.release.call(a);H(b)})};p.configure=function(a){this.m=a};p.getConfiguration=function(){return this.m};p.getCurrentItem=function(){return this.h.length&&this.j>=0&&this.j<this.h.length?this.h[this.j]:null};
p.getCurrentItemIndex=function(){return this.j};p.getItems=function(){return this.h.slice()};p.insertItems=function(a){this.h.push.apply(this.h,x(a));this.dispatchEvent(new T("itemsinserted"))};
p.removeAllItems=function(){var a=this,b,c,d,e;return Q(function(f){if(f.g==1)return a.u.Sa(),a.h.length&&a.j>=0?E(f,a.g.vc(),2):f.B(2);if(f.g!=4){b=[];a.i&&(a.i.preloadManager.l||b.push(a.i.preloadManager.destroy()),a.i=null);a.l&&(a.l.preloadManager.l||b.push(a.l.preloadManager.destroy()),a.l=null);c=u(a.h);for(d=c.next();!d.done;d=c.next())e=d.value,e.preloadManager&&!e.preloadManager.l&&b.push(e.preloadManager.destroy());return b.length?E(f,Promise.all(b),4):f.B(4)}a.h=[];a.j=-1;a.dispatchEvent(new T("itemsremoved"));
H(f)})};
p.playItem=function(a){var b=this,c,d,e,f,g,h,k,l,m,n,q,r,t,v,w,z,y;return Q(function(A){switch(A.g){case 1:b.u.Sa();if(!b.h.length||a>=b.h.length)throw new U(2,7,7007);c=b.getCurrentItem();d=b.h[a];b.j!=a&&(b.j=a,b.dispatchEvent(new T("currentitemchanged")));e=b.g.h;f=b.m?b.m.preloadNextUrlWindow:0;f>0&&(g=!1,b.u.o(e,"timeupdate",function(){var C,F,D,B;return Q(function(G){switch(G.g){case 1:if(b.l||b.h.length<=1||g||b.g.U()||!e.duration)return G.return();C=b.g.wa().end-e.currentTime;if(isNaN(C)){G.B(0);break}if(!(C<=
f)){G.B(0);break}F=b.m&&b.m.repeatMode;D=null;b.j+1<b.h.length?D=b.h[b.j+1]:F==1&&(D=b.h[0]);if(!D||D.preloadManager&&!D.preloadManager.l){G.B(0);break}g=!0;B=null;sa(G,5);return E(G,b.g.preload(D.manifestUri,D.startTime,D.mimeType,D.config),7);case 7:B=G.h;ua(G,6);break;case 5:va(G),B=null;case 6:b.l={item:D,preloadManager:B},g=!1,H(G)}})}));b.u.o(b.g,"complete",function(){var C=b.m&&b.m.repeatMode,F=!1;if(C==2)F=!0;else{var D=b.j+1;D<b.h.length?b.playItem(D):C==1&&(b.h.length==1?F=!0:b.playItem(0))}F&&
(e.paused?(e.currentTime=b.g.wa().start,e.play()):b.u.o(e,"paused",function(){e.currentTime=b.g.wa().start;e.play()}))});h=d.manifestUri;d.preloadManager&&!d.preloadManager.l&&(h=d.preloadManager);k=!1;b.l&&b.l.item==d&&b.l.preloadManager?h=b.l.preloadManager:b.i&&b.i.item==d&&b.i.preloadManager&&(h=b.i.preloadManager,k=!0);if(!b.i){A.B(2);break}if(k||b.i.preloadManager.l){A.B(3);break}return E(A,b.i.preloadManager.destroy(),3);case 3:b.i=null;case 2:if(!(b.m&&b.m.preloadPrevItem&&c&&b.g.l===Pr)){A.B(5);
break}l=null;sa(A,6);return E(A,b.g.ik(),8);case 8:l=A.h;ua(A,7);break;case 6:va(A),l=null;case 7:b.i={item:c,preloadManager:l};case 5:return d.config&&(b.g.Hj(),b.g.configure(d.config)),E(A,b.g.load(h,d.startTime,d.mimeType),9);case 9:b.l=null;if(d.extraText)for(m=u(d.extraText),n=m.next();!n.done;n=m.next())q=n.value,q.mime?b.g.ie(q.uri,q.language,q.kind,q.mime,q.codecs):b.g.ie(q.uri,q.language,q.kind);if(d.extraThumbnail)for(r=u(d.extraThumbnail),t=r.next();!t.done;t=r.next())v=t.value,b.g.hf(v);
if(d.extraChapter)for(w=u(d.extraChapter),z=w.next();!z.done;z=w.next())y=z.value,b.g.gf(y.uri,y.language,y.mime);H(A)}})};S("shaka.queue.QueueManager",yF);yF.prototype.playItem=yF.prototype.playItem;yF.prototype.removeAllItems=yF.prototype.removeAllItems;yF.prototype.insertItems=yF.prototype.insertItems;yF.prototype.getItems=yF.prototype.getItems;yF.prototype.getCurrentItemIndex=yF.prototype.getCurrentItemIndex;yF.prototype.getCurrentItem=yF.prototype.getCurrentItem;
yF.prototype.getConfiguration=yF.prototype.getConfiguration;yF.prototype.configure=yF.prototype.configure;yF.prototype.destroy=yF.prototype.destroy;gr=function(a){return new yF(a)};function zF(){}zF.prototype.parseInit=function(){};zF.prototype.setSequenceMode=function(){};zF.prototype.setManifestType=function(){};zF.prototype.parseMedia=function(a,b){var c=null,d=[];a=Yb(a).split(/\r?\n/);a=u(a);for(var e=a.next();!e.done;e=a.next())if((e=e.value)&&!/^\s+$/.test(e)&&(e=AF.exec(e))){var f=BF.exec(e[1]);f=parseInt(f[1],10)*60+parseFloat(f[2].replace(",","."));e=new ue(f,b.segmentEnd?b.segmentEnd:f+2,e[2]);c&&(c.endTime=f,d.push(c));c=e}c&&d.push(c);return d};
S("shaka.text.LrcTextParser",zF);zF.prototype.parseMedia=zF.prototype.parseMedia;zF.prototype.setManifestType=zF.prototype.setManifestType;zF.prototype.setSequenceMode=zF.prototype.setSequenceMode;zF.prototype.parseInit=zF.prototype.parseInit;var AF=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,BF=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;tf("application/x-subtitle-lrc",function(){return new zF});function CF(){this.g="UNKNOWN"}CF.prototype.parseInit=function(){};CF.prototype.setSequenceMode=function(){};CF.prototype.setManifestType=function(a){this.g=a};
CF.prototype.parseMedia=function(a,b,c,d){var e=Yb(a);a=[];if(e=="")return a;var f=Od(e,"tt",!0);if(!f)throw new U(2,2,2005,"Failed to parse TTML.");e=Yd(f,"body")[0];if(!e)return[];var g=de(f,DF,"frameRate"),h=de(f,DF,"subFrameRate"),k=de(f,DF,"frameRateMultiplier"),l=de(f,DF,"tickRate"),m=de(f,DF,"cellResolution"),n=f.attributes["xml:space"]||"default",q=de(f,EF,"extent");if(n!="default"&&n!="preserve")throw new U(2,2,2005,"Invalid xml:space value: "+n);n=n=="default";g=new FF(g,h,k,l);m=GF(m);
h=Yd(f,"metadata")[0];h=(h?h.children:[]).filter(function(v){return v!="\n"});k=Yd(f,"style");f=Yd(f,"region");l=[];for(var r=u(f),t=r.next();!t.done;t=r.next())(t=HF(this,t.value,k,q))&&l.push(t);if(Vd(e,"p").length)throw new U(2,2,2001,"<p> can only be inside <div> in TTML");q=u(Vd(e,"div"));for(r=q.next();!r.done;r=q.next())if(Vd(r.value,"span").length)throw new U(2,2,2001,"<span> can only be inside <p> in TTML");if(b=IF(this,e,b,g,h,k,f,l,n,m,null,!1,c,d))b.backgroundColor||(b.backgroundColor=
"transparent"),a.push(b);return a};
function IF(a,b,c,d,e,f,g,h,k,l,m,n,q,r){var t=m;if(Td(b)){if(!n)return null;var v={tagName:"span",children:[Wd(b)],attributes:{},parent:null}}else v=b;for(var w=null,z=u(JF),y=z.next();!y.done&&!(w=KF(v,"backgroundImage",e,"#",y.value)[0]);y=z.next());z=null;y=de(v,JF,"backgroundImage");var A=/^(urn:)(mpeg:[a-z0-9][a-z0-9-]{0,31}:)(subs:)([0-9]+)$/;if(y&&A.test(y)){z=parseInt(y.split(":").pop(),10)-1;if(z>=r.length)return null;z=r[z]}else q&&y&&!y.startsWith("#")&&(A=new tb(q),y=new tb(y),(y=A.resolve(y).toString())&&
(z=y));if(b.tagName=="p"||w||z)n=!0;b=n;y=(v.attributes["xml:space"]||(k?"default":"preserve"))=="default";A=v.children.every(Td);k=[];if(!A)for(var C=u(v.children),F=C.next();!F.done;F=C.next())(F=IF(a,F.value,c,d,e,f,g,h,y,l,v,n,q,r))&&k.push(F);e=m!=null;q=Wd(v);q=v.children.length&&q&&/\S/.test(q);C=v.attributes.begin||v.attributes.end||v.attributes.dur;if(!(C||q||v.tagName=="br"||k.length!=0||e&&!y))return null;r=LF(v,d);q=r.start;for(r=r.end;t&&t.tagName&&t.tagName!="tt";)r=MF(t,d,q,r),q=r.start,
r=r.end,t=t.parent;q==null&&(q=0);q+=c.periodStart;r=r==null?Infinity:r+c.periodStart;a.g!=="HLS"&&(q=Math.max(q,c.segmentStart),r=Math.min(r,c.segmentEnd));if(!C&&k.length>0)for(q=Infinity,r=0,c=u(k),d=c.next();!d.done;d=c.next())d=d.value,q=Math.min(q,d.startTime),r=Math.max(r,d.endTime);if(v.tagName=="br")return a=new ue(q,r,""),a.lineBreak=!0,a;c="";A&&(c=ec(Wd(v)||""),y&&(c=c.replace(/\s+/g," ")));c=new ue(q,r,c);c.nestedCues=k;n||(c.isContainer=!0);l&&(c.cellResolution=l);l=KF(v,"region",g,
"")[0];if(v.attributes.region&&l&&l.attributes["xml:id"]){var D=l.attributes["xml:id"];c.region=h.filter(function(B){return B.id==D})[0]}h=l;m&&e&&!v.attributes.region&&!v.attributes.style&&(h=KF(m,"region",g,"")[0]);NF(a,c,v,h,w,z,f,b,k.length==0);return c}
function HF(a,b,c,d){var e=new xd,f=b.attributes["xml:id"];if(!f)return null;e.id=f;f=null;d&&(f=OF.exec(d)||PF.exec(d));d=f?Number(f[1]):null;f=f?Number(f[2]):null;var g,h=QF(a,b,c,"extent");if(h){var k=(g=OF.exec(h))||PF.exec(h);k!=null&&(e.width=Number(k[1]),e.height=Number(k[2]),g||(d!=null&&(e.width=e.width*100/d),f!=null&&(e.height=e.height*100/f)),e.widthUnits=g||d!=null?yd:0,e.heightUnits=g||f!=null?yd:0)}if(a=QF(a,b,c,"origin"))if(k=(g=OF.exec(a))||PF.exec(a),k!=null)e.viewportAnchorX=Number(k[1]),
e.viewportAnchorY=Number(k[2]),g?h||(e.width=100-e.viewportAnchorX,e.widthUnits=yd,e.height=100-e.viewportAnchorY,e.heightUnits=yd):(f!=null&&(e.viewportAnchorY=e.viewportAnchorY*100/f),d!=null&&(e.viewportAnchorX=e.viewportAnchorX*100/d)),e.viewportAnchorUnits=g||d!=null?yd:0;return e}function RF(a){var b=a.match(/rgba\(([^)]+)\)/);return b&&(b=b[1].split(","),b.length==4)?(b[3]=String(Number(b[3])/255),"rgba("+b.join(",")+")"):a}
function NF(a,b,c,d,e,f,g,h,k){h=h||k;SF(a,c,d,g,"direction",h)=="rtl"&&(b.direction="rtl");k=SF(a,c,d,g,"writingMode",h);k=="tb"||k=="tblr"?b.writingMode="vertical-lr":k=="tbrl"?b.writingMode="vertical-rl":k=="rltb"||k=="rl"?b.direction="rtl":k&&(b.direction=xe);(k=SF(a,c,d,g,"textAlign",!0))?(b.positionAlign=TF.get(k),b.lineAlign=UF.get(k),b.textAlign=Ue[k.toUpperCase()]):b.textAlign=we;if(k=SF(a,c,d,g,"displayAlign",!0))b.displayAlign=Ve[k.toUpperCase()];if(k=SF(a,c,d,g,"color",h))b.color=RF(k);
if(k=SF(a,c,d,g,"backgroundColor",h))b.backgroundColor=RF(k);if(k=SF(a,c,d,g,"border",h))b.border=k;if(k=SF(a,c,d,g,"fontFamily",h))switch(k){case "monospaceSerif":b.fontFamily="Courier New,Liberation Mono,Courier,monospace";break;case "proportionalSansSerif":b.fontFamily="Arial,Helvetica,Liberation Sans,sans-serif";break;case "sansSerif":b.fontFamily="sans-serif";break;case "monospaceSansSerif":b.fontFamily="Consolas,monospace";break;case "proportionalSerif":b.fontFamily="serif";break;default:b.fontFamily=
k.split(",").filter(function(l){return l!="default"}).join(",")}(k=SF(a,c,d,g,"fontWeight",h))&&k=="bold"&&(b.fontWeight=Re);k=SF(a,c,d,g,"wrapOption",h);b.wrapLine=k&&k=="noWrap"?!1:!0;(k=SF(a,c,d,g,"lineHeight",h))&&k.match(VF)&&(b.lineHeight=k);(k=SF(a,c,d,g,"fontSize",h))&&(k.match(VF)||k.match(WF))&&(b.fontSize=k);if(k=SF(a,c,d,g,"fontStyle",h))b.fontStyle=Xe[k.toUpperCase()];e?(f=e.attributes.imageType||e.attributes.imagetype,k=e.attributes.encoding,e=Wd(e).trim(),f=="PNG"&&k=="Base64"&&e&&
(b.backgroundImage="data:image/png;base64,"+e)):f&&(b.backgroundImage=f);if(e=SF(a,c,d,g,"textOutline",h))e=e.split(" "),e[0].match(VF)?b.textStrokeColor=b.color:(b.textStrokeColor=RF(e[0]),e.shift()),e[0]&&e[0].match(VF)?b.textStrokeWidth=e[0]:b.textStrokeColor="";(e=SF(a,c,d,g,"letterSpacing",h))&&e.match(VF)&&(b.letterSpacing=e);(e=SF(a,c,d,g,"linePadding",h))&&e.match(VF)&&(b.linePadding=e);if(e=SF(a,c,d,g,"opacity",h))b.opacity=parseFloat(e);(e=QF(a,d,g,"textDecoration"))&&XF(b,e);(e=YF(a,c,
g,"textDecoration"))&&XF(b,e);if(e=SF(a,c,d,g,"textCombine",h))b.textCombineUpright=e;switch(SF(a,c,d,g,"ruby",h)){case "container":b.rubyTag="ruby";break;case "text":b.rubyTag="rt"}}
function XF(a,b){b=u(b.split(" "));for(var c=b.next();!c.done;c=b.next())switch(c.value){case "underline":a.textDecoration.includes(Te)||a.textDecoration.push(Te);break;case "noUnderline":a.textDecoration.includes(Te)&&Tc(a.textDecoration,Te);break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&Tc(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&Tc(a.textDecoration,"overline")}}function SF(a,b,c,d,e,f){f=f===void 0?!0:f;return(b=YF(a,b,d,e))?b:f?QF(a,c,d,e):null}function QF(a,b,c,d){if(!b)return null;var e=de(b,EF,d);return e?e:ZF(a,b,c,d)}function YF(a,b,c,d){var e=de(b,EF,d);return e?e:ZF(a,b,c,d)}
function ZF(a,b,c,d){b=KF(b,"style",c,"");for(var e=null,f=0;f<b.length;f++){var g=ce(b[f],"urn:ebu:tt:style",d);g||(g=de(b[f],EF,d));g||(g=YF(a,b[f],c,d));g&&(e=g)}return e}function KF(a,b,c,d,e){var f=[];if(!a||c.length<1)return f;var g=a;for(a=null;!a&&!(a=e?ce(g,e,b):g.attributes[b])&&(g=g.parent,g););if(b=a)for(b=u(b.split(" ")),e=b.next();!e.done;e=b.next())for(e=e.value,a=u(c),g=a.next();!g.done;g=a.next())if(g=g.value,d+g.attributes["xml:id"]==e){f.push(g);break}return f}
function MF(a,b,c,d){a=LF(a,b);c==null?c=a.start:a.start!=null&&(c+=a.start);d==null?d=a.end:a.start!=null&&(d+=a.start);return{start:c,end:d}}function LF(a,b){var c=$F(a.attributes.begin,b),d=$F(a.attributes.end,b);a=$F(a.attributes.dur,b);d==null&&a!=null&&(d=c+a);return{start:c,end:d}}
function $F(a,b){var c=null;if(aG.test(a)){a=aG.exec(a);c=Number(a[1]);var d=Number(a[2]),e=Number(a[3]),f=Number(a[4]);f+=(Number(a[5])||0)/b.h;e+=f/b.frameRate;c=e+d*60+c*3600}else if(bG.test(a))c=cG(bG,a);else if(dG.test(a))c=cG(dG,a);else if(eG.test(a))a=eG.exec(a),c=Number(a[1])/b.frameRate;else if(fG.test(a))a=fG.exec(a),c=Number(a[1])/b.g;else if(gG.test(a))c=cG(gG,a);else if(a)throw new U(2,2,2001,"Could not parse cue time range in TTML");return c}
function cG(a,b){a=a.exec(b);return a==null||a[0]==""?null:(Number(a[4])||0)/1E3+(Number(a[3])||0)+(Number(a[2])||0)*60+(Number(a[1])||0)*3600}function GF(a){return a?(a=/^(\d+) (\d+)$/.exec(a))?{columns:parseInt(a[1],10),rows:parseInt(a[2],10)}:null:null}S("shaka.text.TtmlTextParser",CF);CF.prototype.parseMedia=CF.prototype.parseMedia;CF.prototype.setManifestType=CF.prototype.setManifestType;CF.prototype.setSequenceMode=CF.prototype.setSequenceMode;CF.prototype.parseInit=CF.prototype.parseInit;
function FF(a,b,c,d){this.frameRate=Number(a)||30;this.h=Number(b)||1;this.g=Number(d);this.g==0&&(this.g=a?this.frameRate*this.h:1);c&&(a=/^(\d+) (\d+)$/g.exec(c))&&(this.frameRate*=Number(a[1])/Number(a[2]))}
var OF=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,WF=/^(\d{1,4}(?:\.\d+)?|100)%$/,VF=/^(\d+px|\d+em|\d*\.?\d+c)$/,PF=/^(\d+)px (\d+)px$/,aG=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,bG=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,dG=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d+)$/,eG=/^(\d*(?:\.\d*)?)f$/,fG=/^(\d*(?:\.\d*)?)t$/,gG=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),UF=(new Map).set("left",Ae).set("center","center").set("right",
"end").set("start",Ae).set("end","end"),TF=(new Map).set("left","line-left").set("center","center").set("right","line-right"),DF=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],EF=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],JF=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];tf("application/ttml+xml",function(){return new CF});function hG(){this.g=new CF}hG.prototype.parseInit=function(a){var b=!1;(new yh).box("moov",Dh).box("trak",Dh).box("mdia",Dh).box("minf",Dh).box("stbl",Dh).X("stsd",Fh).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new U(2,2,2007);};hG.prototype.setSequenceMode=function(a){this.g.setSequenceMode(a)};hG.prototype.setManifestType=function(a){this.g.setManifestType(a)};
hG.prototype.parseMedia=function(a,b,c){var d=[],e=null,f=[],g=new Map,h=[];(new yh).box("moof",Dh).box("traf",Dh).X("tfhd",function(z){e=Ti(z.reader,z.flags).oe}).X("trun",function(z){z=Wi(z.reader,z.version,z.flags);z=u(z.Zh);for(var y=z.next();!y.done;y=z.next())h.push(y.value.sampleSize||e||0)}).X("subs",function(z){for(var y=z.reader,A=y.$(),C=-1,F=0;F<A;F++){var D=y.$();C+=D;D=y.Ia();for(var B=[],G=0;G<D;G++)z.version==1?B.push(y.$()):B.push(y.Ia()),y.ba(),y.ba(),y.$();g.set(C,B)}}).box("mdat",
Ih(function(z){f.push(z)},!1)).parse(a,!1);if(f.length==0)throw new U(2,2,2007);for(var k=oc.apply(fc,x(f)),l=0,m=0;m<h.length;m++){var n=Lb(k,l,h[m]);l+=h[m];var q=g.get(m);if(q&&q.length){n=Lb(n,0,q[0]);for(var r=[],t=q[0],v=1;v<q.length;v++){var w=Lb(a,t,q[v]);w=hc(w);r.push("data:image/png;base64,"+w);t+=q[v]}d=d.concat(this.g.parseMedia(n,b,c,r))}else d=d.concat(this.g.parseMedia(n,b,c,[]))}return d};S("shaka.text.Mp4TtmlParser",hG);hG.prototype.parseMedia=hG.prototype.parseMedia;
hG.prototype.setManifestType=hG.prototype.setManifestType;hG.prototype.setSequenceMode=hG.prototype.setSequenceMode;hG.prototype.parseInit=hG.prototype.parseInit;tf('application/mp4; codecs="stpp"',function(){return new hG});tf('application/mp4; codecs="stpp.ttml"',function(){return new hG});tf('application/mp4; codecs="stpp.ttml.im1i"',function(){return new hG});tf('application/mp4; codecs="stpp.ttml.im1t"',function(){return new hG});tf('application/mp4; codecs="stpp.ttml.im2i"',function(){return new hG});
tf('application/mp4; codecs="stpp.ttml.im2t"',function(){return new hG});tf('application/mp4; codecs="stpp.ttml.etd1"',function(){return new hG});tf('application/mp4; codecs="stpp.ttml.etd1|im1t"',function(){return new hG});tf('application/mp4; codecs="stpp.ttml.im1t|etd1"',function(){return new hG});tf('application/mp4; codecs="stpp.TTML.im1t"',function(){return new hG});function iG(){this.g="UNKNOWN"}iG.prototype.parseInit=function(){};iG.prototype.setSequenceMode=function(){};iG.prototype.setManifestType=function(a){this.g=a};
iG.prototype.parseMedia=function(a,b){a=Yb(a);a=a.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");var c=a.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(c[0]))throw new U(2,2,2E3);a=b.vttOffset;if(this.g=="HLS")if(c[0].includes("X-TIMESTAMP-MAP")){var d=c[0];a=d.match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m);d=d.match(/MPEGTS:(\d+)/m);if(!a||!d)throw new U(2,2,2E3);a=Id(a[1]);if(a==null)throw new U(2,2,2E3);d=Number(d[1]);for(var e=b.segmentStart-b.periodStart;e>=95443.7176888889;)e-=95443.7176888889,
d+=8589934592;a=b.periodStart+d/9E4-a}else b.periodStart&&b.vttOffset==b.periodStart&&(a=0);b=[];d=u(c[0].split("\n"));for(e=d.next();!e.done;e=d.next())if(e=e.value,/^Region:/.test(e)){e=new Ad(e);var f=new xd;Dd(e);Bd(e);for(var g=Dd(e);g;){var h=f,k=g;(g=/^id=(.*)$/.exec(k))?h.id=g[1]:(g=/^width=(\d{1,2}|100)%$/.exec(k))?h.width=Number(g[1]):(g=/^lines=(\d+)$/.exec(k))?(h.height=Number(g[1]),h.heightUnits=2):(g=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?(h.regionAnchorX=Number(g[1]),
h.regionAnchorY=Number(g[2])):(g=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?(h.viewportAnchorX=Number(g[1]),h.viewportAnchorY=Number(g[2])):/^scroll=up$/.exec(k)&&(h.scroll="up");Bd(e);g=Dd(e)}b.push(f)}d=new Map;He(d);e=[];c=u(c.slice(1));for(f=c.next();!f.done;f=c.next()){f=f.value.split("\n");if((f.length!=1||f[0])&&!/^NOTE($|[ \t])/.test(f[0])&&f[0]=="STYLE"){h=[];g=-1;for(k=1;k<f.length;k++)f[k].includes("::cue")&&(h.push([]),g=h.length-1),g!=-1&&(h[g].push(f[k]),f[k].includes("}")&&
(g=-1));h=u(h);for(g=h.next();!g.done;g=h.next()){var l=g.value;g="global";(k=l[0].match(/\((.*)\)/))&&(g=k.pop());k=l.slice(1,-1);l[0].includes("}")&&(l=/\{(.*?)\}/.exec(l[0]))&&(k=l[1].split(";"));(l=d.get(g))||(l=new ue(0,0,""));for(var m=!1,n=0;n<k.length;n++){var q=/^\s*([^:]+):\s*(.*)/.exec(k[n]);if(q){var r=q[2].trim().replace(";","");switch(q[1].trim()){case "background-color":case "background":m=!0;l.backgroundColor=r;break;case "color":m=!0;l.color=r;break;case "font-family":m=!0;l.fontFamily=
r;break;case "font-size":m=!0;l.fontSize=r;break;case "font-weight":if(parseInt(r,10)>=700||r=="bold")m=!0,l.fontWeight=Re;break;case "font-style":switch(r){case "normal":m=!0;l.fontStyle=De;break;case "italic":m=!0;l.fontStyle=Se;break;case "oblique":m=!0,l.fontStyle="oblique"}break;case "opacity":m=!0;l.opacity=parseFloat(r);break;case "text-combine-upright":m=!0;l.textCombineUpright=r;break;case "text-shadow":m=!0;l.textShadow=r;break;case "white-space":m=!0,l.wrapLine=r!="noWrap"}}}m&&d.set(g,
l)}}l=f;m=a;if(l.length==1&&!l[0]||/^NOTE($|[ \t])/.test(l[0])||l[0]=="STYLE"||l[0]=="REGION")f=null;else if(f=null,l[0].includes("--\x3e")||(f=l[0],l.splice(0,1)),h=new Ad(l[0]),g=Fd(h),n=Cd(h,/[ \t]+--\x3e[ \t]+/g),k=Fd(h),g==null||n==null||k==null)bb("Failed to parse VTT time code. Cue skipped:",f,l),f=null;else{g+=m;k+=m;m=l.slice(1).join("\n").trim();d.has("global")?(l=d.get("global").clone(),l.startTime=g,l.endTime=k,l.payload=m):l=new ue(g,k,m);Bd(h);for(g=Dd(h);g;)jG(l,g,b),Bd(h),g=Dd(h);
Ge(l,d);f!=null&&(l.id=f);f=l}f&&e.push(f)}return e};
function jG(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],b=="middle"?a.textAlign=we:a.textAlign=Ue[b.toUpperCase()];else if(d=/^vertical:(lr|rl)$/.exec(b))a.writingMode=d[1]=="lr"?"vertical-lr":"vertical-rl";else if(d=/^size:([\d.]+)%$/.exec(b))a.size=Number(d[1]);else if(d=/^position:([\d.]+)%(?:,(line-left|line-right|middle|center|start|end|auto))?$/.exec(b))a.position=Number(d[1]),d[2]&&(b=d[2],a.positionAlign=b=="line-left"||b=="start"?"line-left":b=="line-right"||
b=="end"?"line-right":b=="center"||b=="middle"?"center":ve);else if(d=/^region:(.*)$/.exec(b)){if(b=kG(c,d[1]))a.region=b}else if(c=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=1,a.line=Number(c[1]),c[2]&&(a.lineAlign=We[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=ze,a.line=Number(c[1]),c[2]&&(a.lineAlign=We[c[2].toUpperCase()])}function kG(a,b){a=a.filter(function(c){return c.id==b});return a.length?a[0]:null}
S("shaka.text.VttTextParser",iG);iG.prototype.parseMedia=iG.prototype.parseMedia;iG.prototype.setManifestType=iG.prototype.setManifestType;iG.prototype.setSequenceMode=iG.prototype.setSequenceMode;iG.prototype.parseInit=iG.prototype.parseInit;tf("text/vtt",function(){return new iG});tf('text/vtt; codecs="vtt"',function(){return new iG});tf('text/vtt; codecs="wvtt"',function(){return new iG});function lG(){this.g=null}lG.prototype.parseInit=function(a){var b=this,c=!1;(new yh).box("moov",Dh).box("trak",Dh).box("mdia",Dh).X("mdhd",function(d){d=Vi(d.reader,d.version);b.g=d.timescale}).box("minf",Dh).box("stbl",Dh).X("stsd",Fh).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new U(2,2,2008);if(!c)throw new U(2,2,2008);};lG.prototype.setSequenceMode=function(){};lG.prototype.setManifestType=function(){};
lG.prototype.parseMedia=function(a,b){if(!a.length)return[];if(!this.g)throw new U(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new yh).box("moof",Dh).box("traf",Dh).X("tfdt",function(A){g=!0;c=Ui(A.reader,A.version).baseMediaDecodeTime}).X("tfhd",function(A){l=Ti(A.reader,A.flags).me}).X("trun",function(A){h=!0;d=Wi(A.reader,A.version,A.flags).Zh}).box("mdat",Ih(function(A){k=!0;e=A},!1)).parse(a,!1);if(!k&&!g&&!h)throw new U(2,2,2008);a=c;for(var m=new vh(e,0),n=u(d),q=n.next();!q.done;q=
n.next()){q=q.value;var r=q.$h||l,t=q.eg?c+q.eg:a;a=t+(r||0);var v=0;do{var w=m.$();v+=w;var z=m.$(),y=null;Ch(z)=="vttc"?w>8&&(y=m.cc(w-8,!1)):m.skip(w-8);r&&y&&(w=mG(y,b.periodStart+t/this.g,b.periodStart+a/this.g),f.push(w))}while(q.sampleSize&&v<q.sampleSize)}return f.filter(Jf)};function mG(a,b,c){var d,e,f;(new yh).box("payl",Ih(function(g){d=Yb(g)},!1)).box("iden",Ih(function(g){e=Yb(g)},!1)).box("sttg",Ih(function(g){f=Yb(g)},!1)).parse(a);return d?nG(d,e,f,b,c):null}
function nG(a,b,c,d,e){a=new ue(d,e,a);Ge(a);b&&(a.id=b);if(c)for(b=new Ad(c),c=Dd(b);c;)jG(a,c,[]),Bd(b),c=Dd(b);return a}S("shaka.text.Mp4VttParser",lG);lG.prototype.parseMedia=lG.prototype.parseMedia;lG.prototype.setManifestType=lG.prototype.setManifestType;lG.prototype.setSequenceMode=lG.prototype.setSequenceMode;lG.prototype.parseInit=lG.prototype.parseInit;tf('application/mp4; codecs="wvtt"',function(){return new lG});function oG(){}oG.prototype.parseInit=function(){};oG.prototype.setSequenceMode=function(){};oG.prototype.setManifestType=function(){};oG.prototype.parseMedia=function(a){var b=Yb(a).replace(/\r+/g,"");b=b.trim();a=[];if(b=="")return a;b=u(b.split("\n\n"));for(var c=b.next();!c.done;c=b.next()){c=c.value.split("\n");var d=new Ad(c[0]),e=Fd(d),f=Cd(d,/,/g);d=Fd(d);if(e==null||f==null||d==null)throw new U(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new ue(e,d,c.slice(1).join("\n").trim()))}return a};
S("shaka.text.SbvTextParser",oG);oG.prototype.parseMedia=oG.prototype.parseMedia;oG.prototype.setManifestType=oG.prototype.setManifestType;oG.prototype.setSequenceMode=oG.prototype.setSequenceMode;oG.prototype.parseInit=oG.prototype.parseInit;tf("text/x-subviewer",function(){return new oG});function pG(){this.g=new iG}pG.prototype.parseInit=function(){};pG.prototype.setSequenceMode=function(){};pG.prototype.setManifestType=function(){};pG.prototype.parseMedia=function(a,b,c){a=Yb(a);a=qG(a);a=Lb(bc(a));return this.g.parseMedia(a,b,c,[])};
function qG(a){var b="WEBVTT\n\n";if(a=="")return b;a=a.replace(/\r+/g,"");a=a.trim();a=u(a.split("\n\n"));for(var c=a.next();!c.done;c=a.next())c=c.value.split(/\n/),c[0].match(/\d+/)&&c.shift(),c[0]=c[0].replace(/,/g,"."),b+=c.join("\n").replace(/{b}/g,"<b>").replace(/{\/b}/g,"</b>").replace(/{i}/g,"<i>").replace(/{\/i}/g,"</i>").replace(/{u}/g,"<u>").replace(/{\/u}/g,"</u>")+"\n\n";return b}S("shaka.text.SrtTextParser",pG);pG.srt2webvtt=qG;pG.prototype.parseMedia=pG.prototype.parseMedia;
pG.prototype.setManifestType=pG.prototype.setManifestType;pG.prototype.setSequenceMode=pG.prototype.setSequenceMode;pG.prototype.parseInit=pG.prototype.parseInit;tf("text/srt",function(){return new pG});function rG(){}rG.prototype.parseInit=function(){};rG.prototype.setSequenceMode=function(){};rG.prototype.setManifestType=function(){};
rG.prototype.parseMedia=function(a){var b="",c="",d=null,e=null;e=Yb(a).split(/\r?\n\s*\r?\n/);a=u(e);for(e=a.next();!e.done;e=a.next()){var f=e.value;e=f;if(f=sG.exec(f))d=f[1],e=f[2];d=="V4 Styles"||d=="V4+ Styles"?(b=e,b=c?b+("\n"+e):e):d=="Events"&&(c=c?c+("\n"+e):e)}d=[];e=null;b=u(b.split(/\r?\n/));for(a=b.next();!a.done;a=b.next())if(a=a.value,!/^\s*;/.test(a)&&(f=tG.exec(a)))if(a=f[1].trim(),f=f[2].trim(),a=="Format")e=f.split(uG);else if(a=="Style"){a=f.split(uG);f={};for(var g=0;g<e.length&&
g<a.length;g++)f[e[g]]=a[g];d.push(f)}e=[];b=null;c=u(c.split(/\r?\n/));f=c.next();for(a={};!f.done;a={Yj:void 0},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=tG.exec(f)))if(f=g[1].trim(),g=g[2].trim(),f=="Format")b=g.split(uG);else if(f=="Dialogue"){g=g.split(uG);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=vG(f.Start);var k=vG(f.End);g=new ue(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));a.Yj=f.Style;(a=d.find(function(l){return function(m){return m.Name==
l.Yj}}(a)))&&wG(g,a);e.push(g)}return e};
function wG(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=xG(c))a.color=c;if(c=b.BackColour)if(c=xG(c))a.backgroundColor=c;b.Bold&&(a.fontWeight=Re);b.Italic&&(a.fontStyle=Se);b.Underline&&a.textDecoration.push(Te);if(c=b.Spacing)a.letterSpacing=c+"px";if(c=b.Alignment)switch(parseInt(c,10)){case 1:a.displayAlign=Be;a.textAlign="start";break;case 2:a.displayAlign=Be;a.textAlign=we;break;case 3:a.displayAlign=Be;a.textAlign="end";break;case 5:a.displayAlign=
"before";a.textAlign="start";break;case 6:a.displayAlign="before";a.textAlign=we;break;case 7:a.displayAlign="before";a.textAlign="end";break;case 9:a.displayAlign="center";a.textAlign="start";break;case 10:a.displayAlign="center";a.textAlign=we;break;case 11:a.displayAlign="center",a.textAlign="end"}if(b=b.AlphaLevel)a.opacity=parseFloat(b)}function xG(a){a=parseInt(a.replace("&H",""),16);return a>=0?"rgba("+(a&255)+","+(a>>8&255)+","+(a>>16&255)+","+(a>>24&255^255)/255+")":null}
function vG(a){a=yG.exec(a);return(a[1]?parseInt(a[1].replace(":",""),10):0)*3600+parseInt(a[2],10)*60+parseFloat(a[3])}S("shaka.text.SsaTextParser",rG);rG.prototype.parseMedia=rG.prototype.parseMedia;rG.prototype.setManifestType=rG.prototype.setManifestType;rG.prototype.setSequenceMode=rG.prototype.setSequenceMode;rG.prototype.parseInit=rG.prototype.parseInit;var sG=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,tG=/^\s*([^:]+):\s*(.*)/,uG=/\s*,\s*/,yG=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;
tf("text/x-ssa",function(){return new rG});function zG(a,b){var c=a[b+1]&1?7:9;return b+c<=a.length&&(a=((a[b+3]&3)<<11|a[b+4]<<3|(a[b+5]&224)>>>5)-c,a>0)?{ve:c,za:a}:null}function AG(a,b){var c=[96E3,88200,64E3,48E3,44100,32E3,24E3,22050,16E3,12E3,11025,8E3,7350],d=(a[b+2]&60)>>>2;if(d>c.length-1)return null;var e=((a[b+2]&192)>>>6)+1,f=(a[b+2]&1)<<2;f|=(a[b+3]&192)>>>6;return{sampleRate:c[d],channelCount:f,codec:"mp4a.40."+e}}
function BG(a,b){if(b+1<a.length&&a[b]===255&&(a[b+1]&246)===240){var c=a[b+1]&1?7:9;if(b+c>=a.length)return!1;var d=(a[b+3]&3)<<11|a[b+4]<<3|(a[b+5]&224)>>>5;if(d<=c)return!1;b+=d;return b===a.length||b+1<a.length&&a[b]===255&&(a[b+1]&246)===240}return!1}
function CG(a,b){switch(a){case "mp4a.40.2":if(b===1)return new Uint8Array([0,200,0,128,35,128]);if(b===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(b===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(b===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(b===5)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(b===6)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,
2,0,178,0,32,8,224]);break;default:if(b===1)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(b===2||b===3)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null};function DG(a){this.j=a;this.h=0;this.g=new Map;this.i=null}p=DG.prototype;p.destroy=function(){this.g.clear()};p.isSupported=function(a){return a.toLowerCase().split(";")[0]=="audio/aac"?jd(this.convertCodecs("audio",a)):!1};p.convertCodecs=function(a,b){return b.toLowerCase().split(";")[0]=="audio/aac"?'audio/mp4; codecs="'+(qf(b)||"mp4a.40.2")+'"':b};p.getOriginalMimeType=function(){return this.j};
p.transmux=function(a,b,c,d){for(var e=Lb(a),f=lk(e),g=f.length;g<e.length&&!BG(e,g);g++);a=c.endTime*1E3;f=kk(f);f.length&&c&&(f=f.find(function(m){return m.description==="com.apple.streaming.transportStreamTimestamp"}))&&(a=f.data);f=AG(e,g);if(!f)return Promise.reject(new U(2,3,3018,c?c.S()[0]:null));b.audioSamplingRate=f.sampleRate;b.channelsCount=f.channelCount;for(var h=[];g<e.length;){var k=zG(e,g);if(!k)return Promise.reject(new U(2,3,3018,c?c.S()[0]:null));var l=k.ve+k.za;g+l<=e.length&&
h.push({data:e.subarray(g+k.ve,g+l),size:k.za,duration:1024,Db:0,flags:{Fb:0,xb:0,ub:0,rb:0,sb:2,Gb:0}});g+=l}e=f.sampleRate;a=Math.floor(a*e/1E3);d={id:b.id,type:"audio",codecs:f.codec,encrypted:b.encrypted&&b.drmInfos.length>0,timescale:e,duration:d,Jb:[],Ma:new Uint8Array([]),Ya:new Uint8Array([]),eb:0,gb:0,data:{sequenceNumber:this.h,baseMediaDecodeTime:a,Hb:h},stream:b};d=new bj([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=cj(d),this.g.set(c,b));c=this.i!==b;d=xj(d);this.i=b;this.h++;
return Promise.resolve({data:d,init:c?b:null})};S("shaka.transmuxer.AacTransmuxer",DG);DG.prototype.transmux=DG.prototype.transmux;DG.prototype.getOriginalMimeType=DG.prototype.getOriginalMimeType;DG.prototype.convertCodecs=DG.prototype.convertCodecs;DG.prototype.isSupported=DG.prototype.isSupported;DG.prototype.destroy=DG.prototype.destroy;Ze("audio/aac",function(){return new DG("audio/aac")},ef);function EG(a,b){if(b+8>a.length||a[b]!==11||a[b+1]!==119)return null;var c=a[b+4]>>6;if(c>=3)return null;var d=a[b+4]&63,e=[64,69,96,64,70,96,80,87,120,80,88,120,96,104,144,96,105,144,112,121,168,112,122,168,128,139,192,128,140,192,160,174,240,160,175,240,192,208,288,192,209,288,224,243,336,224,244,336,256,278,384,256,279,384,320,348,480,320,349,480,384,417,576,384,418,576,448,487,672,448,488,672,512,557,768,512,558,768,640,696,960,640,697,960,768,835,1152,768,836,1152,896,975,1344,896,976,1344,
1024,1114,1536,1024,1115,1536,1152,1253,1728,1152,1254,1728,1280,1393,1920,1280,1394,1920][d*3+c]*2;if(b+e>a.length)return null;var f=a[b+6]>>5,g=0;f===2?g+=2:(f&1&&f!==1&&(g+=2),f&4&&(g+=2));g=(a[b+6]<<8|a[b+7])>>12-g&1;var h=a[b+5]&7;a=new Uint8Array([c<<6|a[b+5]>>3<<1|h>>2,(h&3)<<6|f<<3|g<<2|d>>4,d<<4&224]);return{sampleRate:[48E3,44100,32E3][c],channelCount:[2,1,2,3,3,4,4,5][f]+g,Ma:a,za:e}}
function FG(a,b){if(a[b]===11&&a[b+1]===119){var c=0,d=5;b+=d;for(var e,f;d>0;){f=a[b];var g=Math.min(d,8),h=8-g;e=4278190080>>>24+h<<h;e=(f&e)>>h;c=c?c<<g|e:e;b+=1;d-=g}if(c<16)return!0}return!1};function GG(a){this.j=a;this.h=0;this.g=new Map;this.i=null}p=GG.prototype;p.destroy=function(){this.g.clear()};p.isSupported=function(a){return a.toLowerCase().split(";")[0]=="audio/ac3"?jd(this.convertCodecs("audio",a)):!1};p.convertCodecs=function(a,b){return b.toLowerCase().split(";")[0]=="audio/ac3"?Tb().Ie()?'audio/mp4; codecs="ec-3"':'audio/mp4; codecs="ac-3"':b};p.getOriginalMimeType=function(){return this.j};
p.transmux=function(a,b,c,d){a=Lb(a);for(var e=lk(a),f=e.length;f<a.length&&!FG(a,f);f++);var g=c.endTime*1E3;e=kk(e);e.length&&c&&(e=e.find(function(m){return m.description==="com.apple.streaming.transportStreamTimestamp"}))&&(g=e.data);e=0;for(var h=new Uint8Array([]),k=[];f<a.length;){var l=EG(a,f);if(!l)return Promise.reject(new U(2,3,3018,c?c.S()[0]:null));b.audioSamplingRate=l.sampleRate;b.channelsCount=l.channelCount;e=l.sampleRate;h=l.Ma;k.push({data:a.subarray(f,f+l.za),size:l.za,duration:1536,
Db:0,flags:{Fb:0,xb:0,ub:0,rb:0,sb:2,Gb:0}});f+=l.za}a=Math.floor(g*e/1E3);d={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&b.drmInfos.length>0,timescale:e,duration:d,Jb:[],Ma:h,Ya:new Uint8Array([]),eb:0,gb:0,data:{sequenceNumber:this.h,baseMediaDecodeTime:a,Hb:k},stream:b};d=new bj([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=cj(d),this.g.set(c,b));c=this.i!==b;d=xj(d);this.i=b;this.h++;return Promise.resolve({data:d,init:c?b:null})};S("shaka.transmuxer.Ac3Transmuxer",GG);
GG.prototype.transmux=GG.prototype.transmux;GG.prototype.getOriginalMimeType=GG.prototype.getOriginalMimeType;GG.prototype.convertCodecs=GG.prototype.convertCodecs;GG.prototype.isSupported=GG.prototype.isSupported;GG.prototype.destroy=GG.prototype.destroy;Ze("audio/ac3",function(){return new GG("audio/ac3")},ef);function HG(a,b){if(b+8>a.length||(a[b]<<8|a[b+1]<<0)!==2935)return null;var c=new nk(a.subarray(b+2));pk(c,2);pk(c,3);var d=qk(c,11)+1<<1,e=qk(c,2);if(e==3){e=qk(c,2);e=[24E3,22060,16E3][e];var f=3}else e=[48E3,44100,32E3][e],f=qk(c,2);var g=qk(c,3),h=qk(c,1);c=qk(c,5);if(b+d>a.byteLength)return null;a=Math.floor(d*e/([1,2,3,6][f]*16));a=new Uint8Array([(a&8160)>>5,(a&31)<<3,e<<6|c<<1|0,0|g<<1|h<<0,0]);return{sampleRate:e,channelCount:[2,1,2,3,3,4,4,5][g]+h,Ma:a,za:d}};function IG(a){this.j=a;this.h=0;this.g=new Map;this.i=null}p=IG.prototype;p.destroy=function(){this.g.clear()};p.isSupported=function(a){return a.toLowerCase().split(";")[0]=="audio/ec3"?jd(this.convertCodecs("audio",a)):!1};p.convertCodecs=function(a,b){return b.toLowerCase().split(";")[0]=="audio/ec3"?'audio/mp4; codecs="ec-3"':b};p.getOriginalMimeType=function(){return this.j};
p.transmux=function(a,b,c,d){a=Lb(a);for(var e=lk(a),f=e.length;f<a.length&&(a[f]<<8|a[f+1]<<0)!==2935;f++);var g=c.endTime*1E3;e=kk(e);e.length&&c&&(e=e.find(function(m){return m.description==="com.apple.streaming.transportStreamTimestamp"}))&&(g=e.data);e=0;for(var h=new Uint8Array([]),k=[];f<a.length;){var l=HG(a,f);if(!l)return Promise.reject(new U(2,3,3018,c?c.S()[0]:null));b.audioSamplingRate=l.sampleRate;b.channelsCount=l.channelCount;e=l.sampleRate;h=l.Ma;k.push({data:a.subarray(f,f+l.za),
size:l.za,duration:1536,Db:0,flags:{Fb:0,xb:0,ub:0,rb:0,sb:2,Gb:0}});f+=l.za}a=Math.floor(g*e/1E3);d={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&b.drmInfos.length>0,timescale:e,duration:d,Jb:[],Ma:h,Ya:new Uint8Array([]),eb:0,gb:0,data:{sequenceNumber:this.h,baseMediaDecodeTime:a,Hb:k},stream:b};d=new bj([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=cj(d),this.g.set(c,b));c=this.i!==b;d=xj(d);this.i=b;this.h++;return Promise.resolve({data:d,init:c?b:null})};
S("shaka.transmuxer.Ec3Transmuxer",IG);IG.prototype.transmux=IG.prototype.transmux;IG.prototype.getOriginalMimeType=IG.prototype.getOriginalMimeType;IG.prototype.convertCodecs=IG.prototype.convertCodecs;IG.prototype.isSupported=IG.prototype.isSupported;IG.prototype.destroy=IG.prototype.destroy;Ze("audio/ec3",function(){return new IG("audio/ec3")},ef);function JG(a){if(!a.length)return null;var b=a.find(function(v){return v.type==7});a=a.find(function(v){return v.type==8});if(!b||!a)return null;var c=new nk(b.data),d=wk(c);wk(c);wk(c);sk(c);if(KG.includes(d)&&(d=tk(c),d===3&&pk(c,1),sk(c),sk(c),pk(c,1),vk(c))){d=d!==3?8:12;for(var e=0;e<d;e++)vk(c)&&(e<6?xk(c,16):xk(c,64))}sk(c);d=tk(c);if(d===0)tk(c);else if(d===1)for(pk(c,1),sk(c),sk(c),d=tk(c),e=0;e<d;e++)sk(c);sk(c);pk(c,1);var f=tk(c),g=tk(c),h=qk(c,1);h===0&&pk(c,1);pk(c,1);var k=0,l=0,m=
0,n=0;vk(c)&&(k=tk(c),l=tk(c),m=tk(c),n=tk(c));e=d=1;if(vk(c)&&vk(c)){var q=wk(c),r=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],t=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];q>0&&q<=16?(d=r[q-1],e=t[q-1]):q===255&&(d=qk(c,16),e=qk(c,16))}c=(2-h)*(g+1)*16-m*2-n*2;f=(f+1)*16-k*2-l*2;k=[];b=b.fullData;k.push(b.byteLength>>>8&255);k.push(b.byteLength&255);k=k.concat.apply(k,x(b));b=[];a=a.fullData;b.push(a.byteLength>>>8&255);b.push(a.byteLength&255);b=b.concat.apply(b,x(a));a=new Uint8Array([1,
k[3],k[4],k[5],255,225].concat(k,[1],b));return{height:c,width:f,Ya:a,eb:d,gb:e}}
function LG(a){function b(t){e={data:new Uint8Array([]),frame:!1,isKeyframe:!1,pts:t.pts,dts:t.dts,nalus:[]}}function c(){if(e&&e.nalus.length&&e.frame){for(var t=[],v=u(e.nalus),w=v.next();!w.done;w=v.next()){w=w.value;var z=w.fullData.byteLength,y=new Uint8Array(4);y[0]=z>>24&255;y[1]=z>>16&255;y[2]=z>>8&255;y[3]=z&255;t.push(y);t.push(w.fullData)}e.data=oc.apply(fc,x(t));d.push(e)}}for(var d=[],e=null,f=!1,g=0;g<a.length;g++){var h=a[g],k=h.nalus,l=!1;e&&k.length&&!f&&(c(),b(h));k=u(h.nalus);for(var m=
k.next();!m.done;m=k.next()){m=m.value;var n=!1;switch(m.type){case 1:var q=!1;n=!0;var r=m.data;l&&r.length>4&&(r=yk(new nk(r)),r===2||r===4||r===7||r===9)&&(q=!0);q&&e&&e.frame&&!e.isKeyframe&&(c(),e=null);e||b(h);e.frame=!0;e.isKeyframe=q;break;case 5:n=!0;e&&e.frame&&!e.isKeyframe&&(c(),e=null);e||b(h);e.frame=!0;e.isKeyframe=!0;break;case 6:n=!0;break;case 7:l=n=!0;break;case 8:n=!0;break;case 9:f=n=!0;e&&e.frame&&(c(),e=null);e||b(h);break;case 12:n=!0;break;default:n=!1}e&&n&&e.nalus.push(m)}}c();
return d}var KG=[100,110,122,244,44,83,86,118,128,138,139,134];function MG(a){if(!a.length)return null;var b=a.find(function(g){return g.type==32}),c=a.find(function(g){return g.type==33}),d=a.find(function(g){return g.type==34});if(!b||!c||!d)return null;var e=NG(b.fullData);a=OG(c.fullData);var f=PG(d.fullData);b=QG(b.fullData,c.fullData,d.fullData,{Mh:e.Mh,ri:e.ri,nh:a.nh,oh:a.oh,gh:a.gh,mh:a.mh,hh:a.hh,ih:a.ih,jh:a.jh,kh:a.kh,$g:a.$g,ah:a.ah,bh:a.bh,dh:a.dh,eh:a.eh,fh:a.fh,Pf:a.Pf,Pg:a.Pg,Lg:a.Lg,Kg:a.Kg,Oh:f.Oh,Zg:a.Zg,Yg:a.Yg});return{height:a.height,width:a.width,
Ya:b,eb:a.wm,gb:a.vm}}function NG(a){var b=new nk(a,!0);wk(b);wk(b);qk(b,4);qk(b,2);qk(b,6);a=qk(b,3);b=vk(b);return{Mh:a+1,ri:b}}
function OG(a){a=new nk(a,!0);wk(a);wk(a);var b=0,c=0,d=0,e=0;qk(a,4);var f=qk(a,3);vk(a);for(var g=qk(a,2),h=qk(a,1),k=qk(a,5),l=wk(a),m=wk(a),n=wk(a),q=wk(a),r=wk(a),t=wk(a),v=wk(a),w=wk(a),z=wk(a),y=wk(a),A=wk(a),C=[],F=[],D=0;D<f;D++)C.push(vk(a)),F.push(vk(a));if(f>0)for(D=f;D<8;D++)qk(a,2);for(D=0;D<f;D++)C[D]&&qk(a,88),F[D]&&wk(a);tk(a);C=tk(a);C==3&&qk(a,1);F=tk(a);D=tk(a);vk(a)&&(b+=tk(a),c+=tk(a),d+=tk(a),e+=tk(a));var B=tk(a),G=tk(a),K=tk(a);if(vk(a))for(var I=0;I<=f;I++)tk(a),tk(a),tk(a);
else tk(a),tk(a),tk(a);tk(a);tk(a);tk(a);tk(a);tk(a);tk(a);if(vk(a)&&vk(a))for(I=0;I<4;I++)for(var J=0;J<(I===3?2:6);J++)if(vk(a)){var L=Math.min(64,1<<4+(I<<1));I>1&&uk(a);for(var N=0;N<L;N++)uk(a)}else tk(a);vk(a);vk(a);vk(a)&&(wk(a),tk(a),tk(a),vk(a));I=tk(a);for(L=J=0;L<I;L++)if(N=!1,L!==0&&(N=vk(a)),N){L===I&&tk(a);vk(a);tk(a);for(var P=N=0;P<=J;P++){var O=vk(a),M=!1;O||(M=vk(a));(O||M)&&N++}J=N}else{P=tk(a);N=tk(a);J=P+N;for(O=0;O<P;O++)tk(a),vk(a);for(P=0;P<N;P++)tk(a),vk(a)}if(vk(a))for(I=
tk(a),J=0;J<I;J++){for(L=0;L<K+4;L++)qk(a,1);qk(a,1)}I=K=1;J=!0;L=1;P=N=0;vk(a);vk(a);if(vk(a)){if(vk(a)){O=wk(a);M=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2];var R=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];O>0&&O<=16?(K=M[O-1],I=R[O-1]):O===255&&(K=qk(a,16),I=qk(a,16))}vk(a)&&vk(a);vk(a)&&(qk(a,3),vk(a),vk(a)&&(wk(a),wk(a),wk(a)));vk(a)&&(tk(a),tk(a));vk(a);vk(a);vk(a);if(O=vk(a))sk(a),sk(a),sk(a),sk(a);if(vk(a)&&(L=qk(a,32),N=qk(a,32),vk(a)&&tk(a),vk(a))){R=!1;O=vk(a);M=vk(a);if(O||M){if(R=
vk(a))wk(a),qk(a,5),vk(a),qk(a,5);qk(a,4);qk(a,4);R&&qk(a,4);qk(a,5);qk(a,5);qk(a,5)}for(var V=0;V<=f;V++){J=vk(a);var xa=!0,ba=1;J||(xa=vk(a));var Oa=!1;xa?tk(a):Oa=vk(a);Oa||(ba=tk(a)+1);if(O){for(xa=0;xa<ba;xa++)tk(a),tk(a),R&&(tk(a),tk(a));vk(a)}if(M){for(xa=0;xa<ba;xa++)tk(a),tk(a),R&&(tk(a),tk(a));vk(a)}}}vk(a)&&(vk(a),vk(a),vk(a),P=tk(a),tk(a),tk(a),tk(a),tk(a))}return{gh:A,nh:g,oh:h,mh:k,hh:l,ih:m,jh:n,kh:q,$g:r,ah:t,bh:v,dh:w,eh:z,fh:y,Pf:P,Pg:C,Lg:B,Kg:G,width:F-(b+c)*(C===1||C===2?2:1),
height:D-(d+e)*(C===1?2:1),wm:K,vm:I,Zg:N/L,Yg:J}}function PG(a){var b=new nk(a,!0);wk(b);wk(b);tk(b);tk(b);vk(b);vk(b);qk(b,3);vk(b);vk(b);tk(b);tk(b);uk(b);vk(b);vk(b);vk(b)&&tk(b);uk(b);uk(b);vk(b);vk(b);vk(b);vk(b);a=vk(b);b=vk(b);var c=1;b&&a?c=0:b?c=3:a&&(c=2);return{Oh:c}}
function QG(a,b,c,d){var e=new Uint8Array(23+(5+a.byteLength)+(5+b.byteLength)+(5+c.byteLength));e[0]=1;e[1]=(d.nh&3)<<6|(d.oh?1:0)<<5|d.mh&31;e[2]=d.hh;e[3]=d.ih;e[4]=d.jh;e[5]=d.kh;e[6]=d.$g;e[7]=d.ah;e[8]=d.bh;e[9]=d.dh;e[10]=d.eh;e[11]=d.fh;e[12]=d.gh;e[13]=240|(d.Pf&3840)>>8;e[14]=d.Pf&255;e[15]=252|d.Oh&3;e[16]=252|d.Pg&3;e[17]=248|d.Lg&7;e[18]=248|d.Kg&7;e[19]=0;e[20]=parseInt(d.Zg,10);e[21]=((d.Yg?1:0)&3)<<6|(d.Mh&7)<<3|(d.ri?1:0)<<2|3;e[22]=3;a=[a,b,c];b=23;c=a.length-1;for(d=0;d<a.length;d+=
1)e.set(new Uint8Array([32+d|(d===c?128:0),0,1]),b),b+=3,e.set(new Uint8Array([a[d].byteLength>>8,a[d].byteLength&255]),b),b+=2,e.set(a[d],b),b+=a[d].byteLength;return e};function RG(a,b){var c=a[b+1]>>3&3,d=a[b+1]>>1&3,e=a[b+2]>>4&15,f=a[b+2]>>2&3;if(c!==1&&e!==0&&e!==15&&f!==3){var g=a[b+3]>>6;e=SG[(c===3?3-d:d===3?3:4)*14+e-1]*1E3;f=TG[(c===3?0:c===2?1:2)*3+f];c=UG[c][d];var h=VG[d],k=Math.floor(c*e/f+(a[b+2]>>1&1))*h,l=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);(l=l?parseInt(l[1],10):0)&&l<=87&&d===2&&e>=224E3&&g===0&&(a[b+3]|=128);return{sampleRate:f,channelCount:g===3?1:2,za:k,um:c*8*h}}return null}
function WG(a,b){return a[b]===255&&(a[b+1]&224)===224&&(a[b+1]&6)!==0}function XG(a,b){if(b+1<a.length&&WG(a,b)){var c=RG(a,b),d=4;c&&c.za&&(d=c.za);b+=d;return b===a.length||b+1<a.length&&WG(a,b)}return!1}
var SG=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],TG=[44100,48E3,32E3,22050,24E3,16E3,11025,12E3,8E3],UG=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],VG=[0,1,1,4];function YG(a){this.j=a;this.h=0;this.g=new Map;this.i=null}p=YG.prototype;p.destroy=function(){this.g.clear()};p.isSupported=function(a){return a.toLowerCase().split(";")[0]=="audio/mpeg"?jd(this.convertCodecs("audio",a)):!1};p.convertCodecs=function(a,b){return b.toLowerCase().split(";")[0]=="audio/mpeg"?'audio/mp4; codecs="mp3"':b};p.getOriginalMimeType=function(){return this.j};
p.transmux=function(a,b,c,d){for(var e=Lb(a),f=lk(e).length;f<e.length&&!XG(e,f);f++);var g;for(a=[];f<e.length;){var h=RG(e,f);if(!h)return Promise.reject(new U(2,3,3018,c?c.S()[0]:null));g||(g=h);f+h.za<=e.length&&a.push({data:e.subarray(f,f+h.za),size:h.za,duration:1152,Db:0,flags:{Fb:0,xb:0,ub:0,rb:0,sb:2,Gb:0}});f+=h.za}if(!g)return Promise.reject(new U(2,3,3018,c?c.S()[0]:null));e=g.um*9E4/g.sampleRate*this.h;d={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&b.drmInfos.length>0,timescale:g.sampleRate,
duration:d,Jb:[],Ma:new Uint8Array([]),Ya:new Uint8Array([]),eb:0,gb:0,data:{sequenceNumber:this.h,baseMediaDecodeTime:e,Hb:a},stream:b};d=new bj([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=cj(d),this.g.set(c,b));c=this.i!==b;d=xj(d);this.i=b;this.h++;return Promise.resolve({data:d,init:c?b:null})};S("shaka.transmuxer.Mp3Transmuxer",YG);YG.prototype.transmux=YG.prototype.transmux;YG.prototype.getOriginalMimeType=YG.prototype.getOriginalMimeType;YG.prototype.convertCodecs=YG.prototype.convertCodecs;
YG.prototype.isSupported=YG.prototype.isSupported;YG.prototype.destroy=YG.prototype.destroy;Ze("audio/mpeg",function(){return new YG("audio/mpeg")},ef);function ZG(a){this.h=a;this.g=null}p=ZG.prototype;p.destroy=function(){};p.isSupported=function(a){if(a.toLowerCase().split(";")[0]!="video/mp2t")return!1;var b=qf(a).split(","),c=tc("audio",b);b=tc("video",b);return!c||b||mf(c)!="mp3"?!1:jd(this.convertCodecs("audio",a))};p.convertCodecs=function(a,b){return b.toLowerCase().split(";")[0]=="video/mp2t"?"audio/mpeg":b};p.getOriginalMimeType=function(){return this.h};
p.transmux=function(a,b,c,d,e){this.g?this.g.clearData():this.g=new zk;this.g.ig(c.i);a=Lb(a);a=this.g.parse(a);if(a.pe().audio!="mp3"||e!="audio")return Promise.reject(new U(2,3,3018,c?c.S()[0]:null));c=new Uint8Array([]);e=u(a.Eb());for(a=e.next();!a.done;a=e.next())if(a=a.value.data)for(b=0;b<a.length;)(d=RG(a,b))?(b+d.za<=a.length&&(c=oc(c,a.subarray(b,b+d.za))),b+=d.za):b++;return Promise.resolve(c)};S("shaka.transmuxer.MpegTsTransmuxer",ZG);ZG.prototype.transmux=ZG.prototype.transmux;
ZG.prototype.getOriginalMimeType=ZG.prototype.getOriginalMimeType;ZG.prototype.convertCodecs=ZG.prototype.convertCodecs;ZG.prototype.isSupported=ZG.prototype.isSupported;ZG.prototype.destroy=ZG.prototype.destroy;Ze("video/mp2t",function(){return new ZG("video/mp2t")},df);/*
 @license
 MSS Transmuxer
 Copyright 2015 Dash Industry Forum
 SPDX-License-Identifier: BSD-3-Clause
*/
function $G(a){this.h=a;(this.g=xy.get("ISOBoxer")())&&aH(this)}
function aH(a){function b(){this._procFullBox();this.flags&1&&(this._procField("AlgorithmID","uint",24),this._procField("IV_size","uint",8),this._procFieldArray("KID",16,"uint",8));this._procField("sample_count","uint",32);this._procEntries("entry",this.sample_count,function(c){this._procEntryField(c,"InitializationVector","data",8);this.flags&2&&(this._procEntryField(c,"NumberOfEntries","uint",16),this._procSubEntries(c,"clearAndCryptedData",c.NumberOfEntries,function(d){this._procEntryField(d,"BytesOfClearData",
"uint",16);this._procEntryField(d,"BytesOfEncryptedData","uint",32)}))})}a.g.addBoxProcessor("saio",function(){this._procFullBox();this.flags&1&&(this._procField("aux_info_type","uint",32),this._procField("aux_info_type_parameter","uint",32));this._procField("entry_count","uint",32);this._procFieldArray("offset",this.entry_count,"uint",this.version===1?64:32)});a.g.addBoxProcessor("saiz",function(){this._procFullBox();this.flags&1&&(this._procField("aux_info_type","uint",32),this._procField("aux_info_type_parameter",
"uint",32));this._procField("default_sample_info_size","uint",8);this._procField("sample_count","uint",32);this.default_sample_info_size===0&&this._procFieldArray("sample_info_size",this.sample_count,"uint",8)});a.g.addBoxProcessor("senc",b);a.g.addBoxProcessor("uuid",function(){for(var c=!0,d=0;d<16;d++)this.usertype[d]!==bH[d]&&(c=!1);c&&(this._parsing&&(this.type="sepiff"),b.call(this))})}p=$G.prototype;p.destroy=function(){};
p.isSupported=function(a,b){var c=a.startsWith("mss/");if(!this.g||!c)return!1;if(b)return jd(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return jd(b)||jd(a)};p.convertCodecs=function(a,b){return b.replace("mss/","")};p.getOriginalMimeType=function(){return this.h};
p.transmux=function(a,b,c){if(!c)return Promise.resolve(Lb(a));if(!b.mssPrivateData)return Promise.reject(new U(2,3,3020,c?c.S()[0]:null));try{var d,e=this.g.parseBuffer(a),f=e.fetch("tfhd");f.track_ID=b.id+1;var g=e.fetch("tfdt"),h=e.fetch("traf");g===null&&(g=this.g.createFullBox("tfdt",h,f),g.version=1,g.flags=0,g.baseMediaDecodeTime=Math.floor(c.startTime*b.mssPrivateData.timescale));var k=e.fetch("trun"),l=e.fetch("tfxd");l&&l._parent.boxes.splice(l._parent.boxes.indexOf(l),1);var m=e.fetch("tfrf");
m&&m._parent.boxes.splice(m._parent.boxes.indexOf(m),1);var n=e.fetch("sepiff");if(n!==null){n.type="senc";n.usertype=void 0;var q=e.fetch("saio");if(q===null){q=this.g.createFullBox("saio",h);q.version=0;q.flags=0;q.entry_count=1;q.offset=[0];var r=this.g.createFullBox("saiz",h);r.version=0;r.flags=0;r.sample_count=n.sample_count;r.default_sample_info_size=0;r.sample_info_size=[];if(n.flags&2)for(d=0;d<n.sample_count;d+=1)r.sample_info_size[d]=10+6*n.entry[d].NumberOfEntries;else r.default_sample_info_size=
8}}f.flags&=16777214;f.flags|=131072;k.flags|=1;var t=e.fetch("moof");k.data_offset=t.getLength()+8;var v=e.fetch("saio");v!==null&&(v.offset[0]=cH(t,"traf")+cH(h,"senc")+16);var w=Lb(e.write());return Promise.resolve(w)}catch(z){return z instanceof U?Promise.reject(z):Promise.reject(new U(2,3,3022,c?c.S()[0]:null))}};function cH(a,b){for(var c=8,d=0;d<a.boxes.length&&a.boxes[d].type!==b;d++)c+=a.boxes[d].size;return c}S("shaka.transmuxer.MssTransmuxer",$G);$G.prototype.transmux=$G.prototype.transmux;
$G.prototype.getOriginalMimeType=$G.prototype.getOriginalMimeType;$G.prototype.convertCodecs=$G.prototype.convertCodecs;$G.prototype.isSupported=$G.prototype.isSupported;$G.prototype.destroy=$G.prototype.destroy;var bH=new Uint8Array([162,57,79,82,90,155,79,20,162,68,108,66,124,100,141,244]);Ze("mss/audio/mp4",function(){return new $G("mss/audio/mp4")},ef);Ze("mss/video/mp4",function(){return new $G("mss/video/mp4")},ef);function dH(a){this.m=a;this.g=0;this.j=new Map;this.l=this.i=this.h=null}p=dH.prototype;p.destroy=function(){this.j.clear();this.i&&this.i.destroy()};
p.isSupported=function(a,b){if(a.toLowerCase().split(";")[0]!="video/mp2t")return!1;var c=a;b&&(c=this.convertCodecs(b,a));var d=qf(c).split(",");c=tc("audio",d);d=tc("video",d);if(c&&(c=mf(c),!eH.includes(c))||d&&(c=mf(d),!fH.includes(c)))return!1;if(b)return jd(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return jd(b)||jd(a)};
p.convertCodecs=function(a,b){return b.toLowerCase().split(";")[0]=="video/mp2t"?(b=qf(b).replace("mp4a.40.34","mp3").split(",").map(function(c){return bg(c,"audio/mp4")}).map(cg).join(","),a=="audio"?'audio/mp4; codecs="'+b+'"':'video/mp4; codecs="'+b+'"'):b};p.getOriginalMimeType=function(){return this.m};
p.transmux=function(a,b,c,d,e){var f=Lb(a);if(e=="audio"&&!Hk(f)){for(var g=lk(f),h=g.length;h<f.length;h++)if(XG(f,h))return Promise.reject(new U(2,3,3018,c?c.S()[0]:null));for(h=g.length;h<f.length;h++)if(BG(f,h))return this.i||(this.i=new DG("audio/aac")),this.i.transmux(a,b,c,d,e);return Promise.reject(new U(2,3,3018,c?c.S()[0]:null))}this.h?this.h.clearData():this.h=new zk;this.h.ig(c.i);var k=this.h.parse(f),l=[],m=k.pe();try{var n=null;if(e=="video"){switch(m.video){case "avc":var q=[],r=null,
t=k.Kd(),v=LG(t);if(!v.length)throw new U(2,3,3023,c?c.S()[0]:null);for(var w=0;w<v.length;w++){var z=v[w];r==null&&(r=z.dts);var y=void 0;y=w+1<v.length?(v[w+1].dts||0)-(z.dts||0):v.length>1?(z.dts||0)-(v[w-1].dts||0):(c.endTime-c.startTime)*9E4;q.push({data:z.data,size:z.data.byteLength,duration:y,Db:Math.round((z.pts||0)-(z.dts||0)),flags:{Fb:0,xb:0,ub:0,rb:0,sb:z.isKeyframe?2:1,Gb:z.isKeyframe?0:1}})}for(var A=[],C=u(t),F=C.next();!F.done;F=C.next())A.push.apply(A,x(F.value.nalus));var D=JG(A);
if(!D||r==null)throw new U(2,3,3018,c?c.S()[0]:null);b.height=D.height;b.width=D.width;n={id:b.id,type:"video",codecs:"avc1",encrypted:b.encrypted&&b.drmInfos.length>0,timescale:9E4,duration:d,Jb:[],Ma:new Uint8Array([]),Ya:D.Ya,eb:D.eb,gb:D.gb,data:{sequenceNumber:this.g,baseMediaDecodeTime:r,Hb:q},stream:b};break;case "hvc":var B=[],G=null,K=[],I=k.Kd();if(!I.length)throw new U(2,3,3023,c?c.S()[0]:null);for(var J=0;J<I.length;J++){var L=I[J],N=L.nalus;K.push.apply(K,x(N));for(var P=!1,O=[],M=!1,
R=u(N),V=R.next();!V.done;V=R.next()){var xa=V.value;switch(xa.type){case 1:case 0:var ba=M=!0;break;case 19:case 20:case 21:P=ba=M=!0;break;case 32:ba=!0;break;case 33:ba=!0;break;case 34:ba=!0;break;case 35:M=ba=!0;break;case 39:case 40:ba=!0;break;default:ba=!1}if(M&&ba){var Oa=xa.fullData.byteLength,Ha=new Uint8Array(4);Ha[0]=Oa>>24&255;Ha[1]=Oa>>16&255;Ha[2]=Oa>>8&255;Ha[3]=Oa&255;O.push(Ha);O.push(xa.fullData)}}var Ia=O.length?{data:oc.apply(fc,x(O)),isKeyframe:P}:null;if(Ia){G==null&&L.dts!=
null&&(G=L.dts);var Fa=void 0;Fa=J+1<I.length?(I[J+1].dts||0)-(L.dts||0):I.length>1?(L.dts||0)-(I[J-1].dts||0):(c.endTime-c.startTime)*9E4;B.push({data:Ia.data,size:Ia.data.byteLength,duration:Fa,Db:Math.round((L.pts||0)-(L.dts||0)),flags:{Fb:0,xb:0,ub:0,rb:0,sb:Ia.isKeyframe?2:1,Gb:Ia.isKeyframe?0:1}})}}var wa=MG(K);if(!wa||G==null)throw new U(2,3,3018,c?c.S()[0]:null);b.height=wa.height;b.width=wa.width;n={id:b.id,type:"video",codecs:"hvc1",encrypted:b.encrypted&&b.drmInfos.length>0,timescale:9E4,
duration:d,Jb:[],Ma:new Uint8Array([]),Ya:wa.Ya,eb:wa.eb,gb:wa.gb,data:{sequenceNumber:this.g,baseMediaDecodeTime:G,Hb:B},stream:b}}n&&(l.push(n),n=null)}if(e=="audio"){switch(m.audio){case "aac":for(var Ca=[],Ma,La=null,Ba=null,eb=null,hb=u(k.Eb()),pb=hb.next();!pb.done;pb=hb.next()){var Ua=pb.value,Fc=Ua.data;if(Fc){var ic=0;if(Ba==-1&&eb)Fc=oc(eb,Ua.data),Ba=null;else if(Ba!=null&&eb){ic=Math.max(0,Ba);var Fg=oc(eb,Fc.subarray(0,ic));Ca.push({data:Fg,size:Fg.byteLength,duration:1024,Db:0,flags:{Fb:0,
xb:0,ub:0,rb:0,sb:2,Gb:0}});Ba=eb=null}Ma=AG(Fc,ic);if(!Ma)throw new U(2,3,3018,c?c.S()[0]:null);b.audioSamplingRate=Ma.sampleRate;b.channelsCount=Ma.channelCount;La==null&&Ua.pts!==null&&(La=Ua.pts);for(;ic<Fc.length;){var sd=zG(Fc,ic);if(!sd){eb=Fc.subarray(ic,Fc.length);Ba=-1;break}var Ne=sd.ve+sd.za;Ba=Math.max(0,ic+Ne-Fc.length);Ba!=0?eb=Fc.subarray(ic+sd.ve,ic+Ne):ic+Ne<=Fc.length&&Ca.push({data:Fc.subarray(ic+sd.ve,ic+Ne),size:sd.za,duration:1024,Db:0,flags:{Fb:0,xb:0,ub:0,rb:0,sb:2,Gb:0}});
ic+=Ne}}}if(!Ma||La==null){La=c.startTime*9E4;var Ed=tc("audio",b.codecs.split(","));if(!Ed||!b.channelsCount||!b.audioSamplingRate)throw new U(2,3,3018,c?c.S()[0]:null);Ma={sampleRate:b.audioSamplingRate,channelCount:b.channelsCount,codec:Ed};var Gg=CG(Ed,b.channelsCount);if(!Gg)throw new U(2,3,3018,c?c.S()[0]:null);for(var Qk=La+(c.endTime-c.startTime)*9E4,li=La;li<Qk;)Ca.push({data:Gg,size:Gg.byteLength,duration:1024,Db:0,flags:{Fb:0,xb:0,ub:0,rb:0,sb:2,Gb:0}}),li+=1024/Ma.sampleRate*9E4}var kd=
Ma.sampleRate,XK=La/9E4*kd;n={id:b.id,type:"audio",codecs:Ma.codec,encrypted:b.encrypted&&b.drmInfos.length>0,timescale:kd,duration:d,Jb:[],Ma:new Uint8Array([]),Ya:new Uint8Array([]),eb:0,gb:0,data:{sequenceNumber:this.g,baseMediaDecodeTime:XK,Hb:Ca},stream:b};break;case "ac3":for(var nA=[],zl=0,fq=new Uint8Array([]),Al=null,oA=u(k.Eb()),gq=oA.next();!gq.done;gq=oA.next()){var hq=gq.value,iq=hq.data;Al==null&&hq.pts!==null&&(Al=hq.pts);for(var Ng=0;Ng<iq.length;){var Pe=EG(iq,Ng);Pe?(b.audioSamplingRate=
Pe.sampleRate,b.channelsCount=Pe.channelCount,zl=Pe.sampleRate,fq=Pe.Ma,nA.push({data:iq.subarray(Ng,Ng+Pe.za),size:Pe.za,duration:1536,Db:0,flags:{Fb:0,xb:0,ub:0,rb:0,sb:2,Gb:0}}),Ng+=Pe.za):Ng++}}if(zl==0||fq.byteLength==0||Al==null)throw new U(2,3,3018,c?c.S()[0]:null);var YK=Al/9E4*zl;n={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&b.drmInfos.length>0,timescale:zl,duration:d,Jb:[],Ma:fq,Ya:new Uint8Array([]),eb:0,gb:0,data:{sequenceNumber:this.g,baseMediaDecodeTime:YK,Hb:nA},stream:b};
break;case "ec3":for(var pA=[],Bl=0,jq=new Uint8Array([]),Cl=null,qA=u(k.Eb()),kq=qA.next();!kq.done;kq=qA.next()){var lq=kq.value,mq=lq.data;Cl==null&&lq.pts!==null&&(Cl=lq.pts);for(var Og=0;Og<mq.length;){var Qe=HG(mq,Og);Qe?(b.audioSamplingRate=Qe.sampleRate,b.channelsCount=Qe.channelCount,Bl=Qe.sampleRate,jq=Qe.Ma,pA.push({data:mq.subarray(Og,Og+Qe.za),size:Qe.za,duration:1536,Db:0,flags:{Fb:0,xb:0,ub:0,rb:0,sb:2,Gb:0}}),Og+=Qe.za):Og++}}if(Bl==0||jq.byteLength==0||Cl==null)throw new U(2,3,3018,
c?c.S()[0]:null);var ZK=Cl/9E4*Bl;n={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&b.drmInfos.length>0,timescale:Bl,duration:d,Jb:[],Ma:jq,Ya:new Uint8Array([]),eb:0,gb:0,data:{sequenceNumber:this.g,baseMediaDecodeTime:ZK,Hb:pA},stream:b};break;case "mp3":for(var rA=[],Dl,El=null,sA=u(k.Eb()),nq=sA.next();!nq.done;nq=sA.next()){var oq=nq.value,xi=oq.data;if(xi){El==null&&oq.pts!==null&&(El=oq.pts);for(var yf=0;yf<xi.length;){var Pg=RG(xi,yf);Pg?(Dl||(Dl=Pg),yf+Pg.za<=xi.length&&rA.push({data:xi.subarray(yf,
yf+Pg.za),size:Pg.za,duration:1152,Db:0,flags:{Fb:0,xb:0,ub:0,rb:0,sb:2,Gb:0}}),yf+=Pg.za):yf++}}}if(!Dl||El==null)throw new U(2,3,3018,c?c.S()[0]:null);var tA=Dl.sampleRate,$K=El/9E4*tA;n={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&b.drmInfos.length>0,timescale:tA,duration:d,Jb:[],Ma:new Uint8Array([]),Ya:new Uint8Array([]),eb:0,gb:0,data:{sequenceNumber:this.g,baseMediaDecodeTime:$K,Hb:rA},stream:b};break;case "opus":var uA=[],Fl=null,Gd=k.H;if(!Gd)throw new U(2,3,3018,c?c.S()[0]:
null);var kc=[];switch(Gd.yk){case 1:case 2:kc=[0];break;case 0:kc=[255,1,1,0,1];break;case 128:kc=[255,2,0,0,1];break;case 3:kc=[1,2,1,0,2,1];break;case 4:kc=[1,2,2,0,1,2,3];break;case 5:kc=[1,3,2,0,4,1,2,3];break;case 6:kc=[1,4,2,0,4,1,2,3,5];break;case 7:kc=[1,4,2,0,4,1,2,3,5,6];break;case 8:kc=[1,5,3,0,6,1,2,3,4,5,7];break;case 130:kc=[1,1,2,0,1];break;case 131:kc=[1,1,3,0,1,2];break;case 132:kc=[1,1,4,0,1,2,3];break;case 133:kc=[1,1,5,0,1,2,3,4];break;case 134:kc=[1,1,6,0,1,2,3,4,5];break;case 135:kc=
[1,1,7,0,1,2,3,4,5,6];break;case 136:kc=[1,1,8,0,1,2,3,4,5,6,7]}var vA=new Uint8Array([0,Gd.channelCount,0,0,Gd.sampleRate>>>24&255,Gd.sampleRate>>>17&255,Gd.sampleRate>>>8&255,Gd.sampleRate>>>0&255,0,0].concat(x(kc)));for(var wA=Gd.sampleRate,xA=u(k.Eb()),pq=xA.next();!pq.done;pq=xA.next()){var qq=pq.value,Qg=qq.data;Fl==null&&qq.pts!==null&&(Fl=qq.pts);for(var yi=0;yi<Qg.length;){for(var aL=(Qg[yi+1]&16)!==0,bL=(Qg[yi+1]&8)!==0,ne=yi+2,Gl=0;Qg[ne]===255;)Gl+=255,ne+=1;Gl+=Qg[ne];ne+=1;ne+=aL?2:
0;ne+=bL?2:0;var yA=Qg.slice(ne,ne+Gl);uA.push({data:yA,size:yA.byteLength,duration:960,Db:0,flags:{Fb:0,xb:0,ub:0,rb:0,sb:2,Gb:0}});yi=ne+Gl}}if(vA.byteLength==0||Fl==null)throw new U(2,3,3018,c?c.S()[0]:null);b.audioSamplingRate=Gd.sampleRate;b.channelsCount=Gd.channelCount;var cL=Fl/9E4*wA;n={id:b.id,type:"audio",codecs:"opus",encrypted:b.encrypted&&b.drmInfos.length>0,timescale:wA,duration:d,Jb:[],Ma:vA,Ya:new Uint8Array([]),eb:0,gb:0,data:{sequenceNumber:this.g,baseMediaDecodeTime:cL,Hb:uA},
stream:b}}n&&(l.push(n),n=null)}}catch(rq){return rq&&rq.code==3023?Promise.resolve(new Uint8Array([])):Promise.reject(rq)}if(!l.length)return Promise.reject(new U(2,3,3018,c?c.S()[0]:null));var zA=new bj(l),sq=b.id+"_"+c.i;if(this.j.has(sq))var zi=this.j.get(sq);else zi=cj(zA),this.j.set(sq,zi);var dL=this.l!==zi,eL=xj(zA);this.l=zi;this.g++;return Promise.resolve({data:eL,init:dL?zi:null})};S("shaka.transmuxer.TsTransmuxer",dH);dH.prototype.transmux=dH.prototype.transmux;
dH.prototype.getOriginalMimeType=dH.prototype.getOriginalMimeType;dH.prototype.convertCodecs=dH.prototype.convertCodecs;dH.prototype.isSupported=dH.prototype.isSupported;dH.prototype.destroy=dH.prototype.destroy;var eH=["aac","ac-3","ec-3","mp3","opus"],fH=["avc","hevc"];Ze("video/mp2t",function(){return new dH("video/mp2t")},cf);function gH(){}ma(gH,Un);S("shaka.util.FairPlayUtils",gH);function hH(a,b){var c=this;this.parent=a;this.controls=b;this.eventManager=new Wc;this.localization=this.controls.ya;this.player=this.controls.Yb();this.video=this.controls.Wc();this.adManager=this.player.vf();this.ad=b.getAd();this.eventManager.o(this.adManager,"ad-started",function(d){c.ad=d.ad});this.eventManager.o(this.adManager,"ad-stopped",function(){c.ad=null})}
hH.prototype.release=function(){this.eventManager.release();this.ad=this.adManager=this.video=this.player=this.localization=this.eventManager=this.controls=this.parent=null};S("shaka.ui.Element",hH);hH.prototype.release=hH.prototype.release;function iH(a,b){this.parent=a;this.g=Wj("svg");this.h=Wj("path");this.g.classList.add("material-svg-icon");this.g.setAttribute("viewBox","0 -960 960 960");b&&this.use(b);this.g.appendChild(this.h);this.parent&&a.appendChild(this.g)}iH.prototype.use=function(a){a&&typeof a=="string"&&this.h.setAttribute("d",a)};iH.prototype.wl=function(){return this.g};S("shaka.ui.MaterialSVGIcon",iH);iH.prototype.getSvgElement=iH.prototype.wl;iH.prototype.use=iH.prototype.use;function jH(a){return kH(a,"shaka-back-to-overflow-button")}function kH(a,b){a=a.getElementsByClassName(b);return a.length?a[0]:null}function lH(a){a&&(a=kH(a,"shaka-chosen-item"))&&a.parentElement.focus()}function mH(){var a=(new iH(null,"m382-354 339-339q12-12 28-12t28 12q12 12 12 28.5T777-636L410-268q-12 12-28 12t-28-12L182-440q-12-12-11.5-28.5T183-497q12-12 28.5-12t28.5 12l142 143Z")).g;a.classList.add("shaka-chosen-item");a.ariaHidden="true";return a}
function nH(a,b){a&&(b?a.classList.remove("shaka-hidden"):a.classList.add("shaka-hidden"))}function oH(a,b){var c=Math.floor(a/86400),d=Math.floor(a%86400/3600),e=Math.floor(a/60%60);a=Math.floor(a%60);a<10&&(a="0"+a);a=e+":"+a;b&&(e<10&&(a="0"+a),a=d+":"+a,c>0&&(d<10&&(a="0"+a),a=c+":"+a));return a};function pH(a,b){hH.call(this,a,b);var c=this;this.g=Xj();this.g.classList.add("shaka-ad-info");this.g.disabled=!0;this.parent.appendChild(this.g);this.h=new Gf(function(){if(c.ad.isLinear()){var d="",e=c.ad.getSequenceLength();e>1&&(d=c.ad.getPositionInSequence(),d=c.localization.resolve("AD_PROGRESS").replace("[AD_ON]",String(d)).replace("[NUM_ADS]",String(e)));var f=Math.round(c.ad.getRemainingTime()),g=c.ad.getDuration();f==-1||g==-1?(c.g.textContent=d,nH(c.g,d!="")):f>0?(f=oH(g-f,!1)+" / "+oH(g,
!1),d=e>1?d+("\u00a0\u00a0"+f):c.localization.resolve("AD_TIME").replace("[AD_TIME]",f),c.g.textContent=d,nH(c.g,d!="")):(c.h.stop(),c.g.textContent="")}});this.eventManager.o(this.localization,"locale-updated",function(){});this.eventManager.o(this.localization,"locale-changed",function(){});this.eventManager.o(this.adManager,"ad-started",function(){c.h.Ka();c.h.xa(.5)});this.eventManager.o(this.adManager,"ad-stopped",function(){c.h.stop();c.g.textContent=""});this.ad&&(this.h.Ka(),this.h.xa(.5))}
ma(pH,hH);pH.prototype.release=function(){this.h.stop();this.h=null;hH.prototype.release.call(this)};S("shaka.ui.AdInfo",pH);function qH(a,b){hH.call(this,a,b);var c=this;this.j=this.controls.g;this.h=this.controls.i;this.i=[];this.g=W("div");this.g.classList.add("shaka-no-propagation");this.g.classList.add("shaka-context-menu");this.g.classList.add("shaka-hidden");this.h.appendChild(this.g);this.eventManager.o(this.h,"contextmenu",function(d){if(c.g.classList.contains("shaka-hidden")){d.preventDefault();var e=c.h.getBoundingClientRect();c.g.style.left=d.clientX-e.left+"px";c.g.style.top=d.clientY-e.top+"px";nH(c.g,!0)}else nH(c.g,
!1)});this.eventManager.o(window,"click",function(){nH(c.g,!1)});this.eventManager.o(this.g,"click",function(){nH(c.g,!1)});rH(this)}ma(qH,hH);qH.prototype.release=function(){this.h=null;for(var a=u(this.i),b=a.next();!b.done;b=a.next())b.value.release();this.i=[];hH.prototype.release.call(this)};qH.prototype.Oi=function(){nH(this.g,!1)};function sH(a,b){tH.set(a,b)}
function rH(a){for(var b=u(a.j.contextMenuElements),c=b.next();!c.done;c=b.next()){c=c.value;var d=tH.get(c);d?a.i.push(d.create(a.g,a.controls)):bb("Unrecognized context menu element:",c)}}S("shaka.ui.ContextMenu",qH);qH.registerElement=sH;qH.prototype.closeMenu=qH.prototype.Oi;var tH=new Map;function uH(a,b){hH.call(this,a,b);var c=this;this.button=Xj();this.parent.appendChild(this.button);this.h=new iH(this.button);this.eventManager.o(this.localization,"locale-updated",function(){vH(c)});this.eventManager.o(this.localization,"locale-changed",function(){vH(c)});this.eventManager.o(this.video,"play",function(){vH(c);c.g()});this.eventManager.o(this.video,"pause",function(){vH(c);c.g()});this.eventManager.o(this.video,"seeking",function(){vH(c);c.g()});this.eventManager.o(this.player,"loaded",
function(){vH(c);c.g()});this.eventManager.o(this.adManager,"ad-paused",function(){vH(c);c.g()});this.eventManager.o(this.adManager,"ad-resumed",function(){vH(c);c.g()});this.eventManager.o(this.adManager,"ad-started",function(){vH(c);c.g()});this.eventManager.o(this.adManager,"ad-stopped",function(){vH(c);c.g()});this.eventManager.o(this.button,"click",function(){c.controls.Ca()&&wH(c.controls)});vH(this);this.g()}ma(uH,hH);
uH.prototype.isPaused=function(){if(this.ad&&this.ad.isLinear())var a=this.ad.isPaused();else a=this.controls,a=a.C.paused&&!a.V;return a};uH.prototype.isEnded=function(){return this.ad&&this.ad.isLinear()?!1:this.player?this.player.isEnded():!0};function vH(a){if(a.isEnded()&&a.video.duration)a.button.ariaLabel=a.localization.resolve("REPLAY");else{var b=a.isPaused()?"PLAY":"PAUSE";a.button.ariaLabel=a.localization.resolve(b)}}
uH.prototype.g=function(){this.isEnded()&&this.video.duration?this.h.use("M480-80q-75 0-140.5-28.5t-114-77q-48.5-48.5-77-114T120-440q0-17 11.5-28.5T160-480q17 0 28.5 11.5T200-440q0 117 81.5 198.5T480-160q117 0 198.5-81.5T760-440q0-117-81.5-198.5T480-720h-6l34 34q12 12 11.5 28T508-630q-12 12-28.5 12.5T451-629L348-732q-12-12-12-28t12-28l103-103q12-12 28.5-11.5T508-890q11 12 11.5 28T508-834l-34 34h6q75 0 140.5 28.5t114 77q48.5 48.5 77 114T840-440q0 75-28.5 140.5t-77 114q-48.5 48.5-114 77T480-80Z"):this.h.use(this.isPaused()?
"M320-273v-414q0-17 12-28.5t28-11.5q5 0 10.5 1.5T381-721l326 207q9 6 13.5 15t4.5 19q0 10-4.5 19T707-446L381-239q-5 3-10.5 4.5T360-233q-16 0-28-11.5T320-273Z":"M640-200q-33 0-56.5-23.5T560-280v-400q0-33 23.5-56.5T640-760q33 0 56.5 23.5T720-680v400q0 33-23.5 56.5T640-200Zm-320 0q-33 0-56.5-23.5T240-280v-400q0-33 23.5-56.5T320-760q33 0 56.5 23.5T400-680v400q0 33-23.5 56.5T320-200Z")};S("shaka.ui.PlayButton",uH);function xH(a,b){uH.call(this,a,b);this.button.classList.add("shaka-play-button");this.button.classList.add("shaka-no-propagation")}ma(xH,uH);xH.prototype.g=function(){this.isEnded()&&this.video.duration?this.button.setAttribute("icon","replay"):this.isPaused()?this.button.setAttribute("icon","play"):this.button.setAttribute("icon","pause")};S("shaka.ui.BigPlayButton",xH);function yH(a,b){hH.call(this,a,b);var c=this;this.m=null;this.i=this.D=!1;this.C=this.A=null;this.j=new Gf(function(){parseInt(c.h.textContent,10)===0&&zH(c.controls,!0);var d=parseInt(c.h.textContent,10);d!==0&&(c.video.currentTime=c.controls.rh()+d);c.g.style.opacity="0";c.D=!1;c.h.textContent="0s"});this.g=W("div");this.g.classList.add("shaka-no-propagation");this.parent.appendChild(this.g);this.h=W("span");this.h.textContent="0s";this.g.appendChild(this.h);this.u=new iH(this.g);this.u.g.classList.add("shaka-forward-rewind-container-icon");
this.l=!1;this.eventManager.o(this.g,"touchstart",function(d){d.touches.length>0&&(c.A=d.touches[0].clientX,c.C=d.touches[0].clientY);c.i=!1});this.eventManager.o(this.g,"touchmove",function(d){if(d.touches.length>0&&c.A!=null&&c.C!=null){var e=d.touches[0].clientX-c.A;d=d.touches[0].clientY-c.C;Math.sqrt(e*e+d*d)>10&&(c.i=!0)}});this.eventManager.o(this.g,"touchend",function(d){if(!c.i)if(c.controls.Nc())d.preventDefault(),c.controls.Xc();else if(c.controls.g.tapSeekDistance>0&&(!c.ad||!c.ad.isLinear()))if(d.preventDefault(),
d=c.controls.g.tapSeekDistance,!c.D)c.D=!0,c.m=Date.now(),c.j.Y(.5);else if(c.m+500>Date.now()){c.j.stop();c.m=Date.now();var e=parseInt(c.h.textContent,10);e=c.l?e-d:e+d;c.h.textContent=e.toString()+"s";c.g.style.opacity="1";c.j.Y(.5)}})}ma(yH,hH);S("shaka.ui.HiddenSeekButton",yH);function AH(a,b){yH.call(this,a,b);this.g.classList.add("shaka-fast-forward-container");this.u.use("M100-315v-330q0-18 12-29t28-11q5 0 11 1t11 5l248 166q9 6 13.5 14.5T428-480q0 10-4.5 18.5T410-447L162-281q-5 4-11 5t-11 1q-16 0-28-11t-12-29Zm400 0v-330q0-18 12-29t28-11q5 0 11 1t11 5l248 166q9 6 13.5 14.5T828-480q0 10-4.5 18.5T810-447L562-281q-5 4-11 5t-11 1q-16 0-28-11t-12-29Z");this.l=!1}ma(AH,yH);S("shaka.ui.HiddenFastForwardButton",AH);function BH(a,b){yH.call(this,a,b);this.g.classList.add("shaka-rewind-container");this.u.use("M798-281 550-447q-9-6-13.5-14.5T532-480q0-10 4.5-18.5T550-513l248-166q5-4 11-5t11-1q16 0 28 11t12 29v330q0 18-12 29t-28 11q-5 0-11-1t-11-5Zm-400 0L150-447q-9-6-13.5-14.5T132-480q0-10 4.5-18.5T150-513l248-166q5-4 11-5t11-1q16 0 28 11t12 29v330q0 18-12 29t-28 11q-5 0-11-1t-11-5Z");this.l=!0}ma(BH,yH);S("shaka.ui.HiddenRewindButton",BH);function CH(a,b,c,d){hH.call(this,a,b);var e=this;this.container=W("div");this.container.classList.add("shaka-range-container");this.container.classList.add.apply(this.container.classList,x(c));this.i=!1;this.bar=document.createElement("input");this.G=new Gf(function(){e.onChangeEnd();e.i=!1});this.bar.classList.add("shaka-range-element");this.bar.classList.add.apply(this.bar.classList,x(d));this.bar.type="range";this.bar.step="any";this.bar.min="0";this.bar.max="1";this.bar.value="0";this.bar.disabled=
!this.controls.Ca();this.container.appendChild(this.bar);this.parent.appendChild(this.container);this.L=new Gf(function(){e.bar.disabled=!1});this.eventManager.o(this.controls,"showingui",function(){e.L.Y(0)});this.eventManager.o(this.controls,"hidingui",function(){e.L.stop();e.bar.disabled=!0});this.eventManager.o(this.bar,"mousedown",function(f){e.bar.disabled||(e.i=!0,e.onChangeStart(),f.stopPropagation())});this.eventManager.o(this.bar,"touchstart",function(f){e.bar.disabled||(e.i=!0,DH(e,f),
e.onChangeStart(),f.stopPropagation())});this.eventManager.o(this.bar,"input",function(){e.onChange()});this.eventManager.o(this.bar,"touchmove",function(f){e.i&&(DH(e,f),e.onChange(),f.stopPropagation())});this.eventManager.o(this.bar,"touchend",function(f){e.i&&(e.i=!1,DH(e,f),e.onChangeEnd(),f.stopPropagation())});this.eventManager.o(this.bar,"touchcancel",function(f){e.i&&(e.i=!1,DH(e,f),e.onChangeEnd(),f.stopPropagation())});this.eventManager.o(this.bar,"mouseup",function(f){e.i&&(e.i=!1,e.onChangeEnd(),
f.stopPropagation())});this.eventManager.o(this.bar,"blur",function(){e.i&&(e.i=!1,e.onChangeEnd())});this.eventManager.o(this.bar,"contextmenu",function(f){f.preventDefault();f.stopPropagation()})}ma(CH,hH);p=CH.prototype;p.release=function(){this.G&&(this.G.stop(),this.G=null);hH.prototype.release.call(this)};p.setRange=function(a,b){this.bar.min=a;this.bar.max=b};p.onChangeStart=function(){};p.onChange=function(){};p.onChangeEnd=function(){};
p.changeTo=function(a){this.i||(this.i=!0,this.onChangeStart());var b=parseFloat(this.bar.min),c=parseFloat(this.bar.max);this.bar.value=a>c?c:a<b?b:a;this.onChange();this.G.Y(.5)};p.getValue=function(){return parseFloat(this.bar.value)};p.setValue=function(a){this.i||(this.bar.value=a)};
function EH(a,b){var c=a.bar.getBoundingClientRect(),d=parseFloat(a.bar.min),e=parseFloat(a.bar.max);a=parseFloat(a.bar.step)||1;var f=c.left+6;c=c.right-6;b=d+(Math.max(f,Math.min(c,b))-f)/(c-f)*(e-d);b=Math.round((b-d)/a)*a+d;return b=Math.min(e,Math.max(d,b))}function DH(a,b){b.preventDefault();a.bar.value=EH(a,b.changedTouches[0].clientX)}S("shaka.ui.RangeElement",CH);CH.prototype.setValue=CH.prototype.setValue;CH.prototype.getValue=CH.prototype.getValue;CH.prototype.changeTo=CH.prototype.changeTo;
CH.prototype.onChangeEnd=CH.prototype.onChangeEnd;CH.prototype.onChange=CH.prototype.onChange;CH.prototype.onChangeStart=CH.prototype.onChangeStart;CH.prototype.setRange=CH.prototype.setRange;function FH(a,b){CH.call(this,a,b,["shaka-seek-bar-container"],["shaka-seek-bar","shaka-no-propagation","shaka-show-controls-on-mouse-over"]);var c=this;this.F=W("div");this.F.classList.add("shaka-ad-markers");this.container.insertBefore(this.F,this.container.childNodes[0]);this.I=this.controls.g;this.C=new Gf(function(){var d=c.getValue();c.player.U()||d==c.video.duration&&(d-=.001);c.video.currentTime=d});this.D=new Gf(function(){GH(c)});this.M=!1;this.h=W("div");this.h.id="shaka-player-ui-thumbnail-container";
this.g=W("img");this.g.id="shaka-player-ui-thumbnail-image";this.g.draggable=!1;this.K=W("div");this.K.id="shaka-player-ui-thumbnail-time-container";this.H=W("div");this.H.id="shaka-player-ui-thumbnail-time";this.K.appendChild(this.H);this.h.appendChild(this.g);this.h.appendChild(this.K);this.container.appendChild(this.h);this.j=W("div");this.j.id="shaka-player-ui-time-container";this.container.appendChild(this.j);this.l=this.u=null;this.J=!1;this.A=new Gf(function(){HH(c)});this.m=[];this.eventManager.o(this.bar,
"input",function(){c.controls.Xc()});this.eventManager.o(this.localization,"locale-updated",function(){return IH(c)});this.eventManager.o(this.localization,"locale-changed",function(){return IH(c)});this.eventManager.o(this.adManager,"ad-started",function(){JH(c)||nH(c.container,!1)});this.eventManager.o(this.adManager,"ad-stopped",function(){JH(c)&&nH(c.container,!0)});this.eventManager.o(this.adManager,"ad-cue-points-changed",function(d){c.m=d.cuepoints;KH(c)});this.eventManager.o(this.player,"unloading",
function(){c.m=[];KH(c);c.l&&(c.l.abort(),c.l=null);c.u=null;HH(c);LH(c)});this.eventManager.o(this.bar,"mousemove",function(d){if(c.controls.Nc())LH(c),HH(c);else{var e=EH(c,d.clientX),f=c.bar.getBoundingClientRect();d=Math.max(0,d.clientX-f.left);c.player.sh().length?(LH(c),MH(c,d,e)):(HH(c),NH(c,d,e))}});this.eventManager.o(this.container,"mouseleave",function(){LH(c);c.A.stop();c.A.Y(.25)});this.setValue(this.video.currentTime);this.update();IH(this);this.ad&&nH(this.container,!1)}ma(FH,CH);
p=FH.prototype;p.release=function(){this.C&&(this.C.stop(),this.C=null,this.D.stop(),this.D=null);CH.prototype.release.call(this)};p.onChangeStart=function(){this.M=!this.video.paused;this.controls.ii(!0);this.video.pause();this.A.stop();this.J=!0};
p.onChange=function(){if(this.video.duration)if(this.update(),this.C.Y(.125),this.player.sh().length&&!this.controls.Nc()){var a=parseFloat(this.bar.min),b=parseFloat(this.bar.max),c=this.bar.getBoundingClientRect(),d=Math.round(this.getValue());MH(this,(d-a)/((b-a)/c.width),d)}else HH(this)};p.onChangeEnd=function(){this.C.Ka();this.controls.ii(!1);this.M&&this.video.play();this.J&&(this.J=!1,this.A.stop(),this.A.Y(.25))};p.isShowing=function(){return!this.container.classList.contains("shaka-hidden")};
p.update=function(){var a=this.I.seekBarColors,b=this.getValue(),c=this.video.buffered.length,d=c?this.video.buffered.start(0):0,e=c?this.video.buffered.end(c-1):0;c=this.player.wa();var f=c.end-c.start;this.setRange(c.start,c.end);JH(this)?(nH(this.container,!0),d=(Math.max(d,c.start)-c.start)/f||0,e=(Math.min(e,c.end)-c.start)/f||0,b=(Math.min(Math.max(b,c.start),c.end)-c.start)/f||0,this.container.style.background="linear-gradient("+["to right",(this.I.showUnbufferedStart?a.base:a.played)+" "+
d*100+"%",a.played+" "+d*100+"%",a.played+" "+b*100+"%",a.buffered+" "+b*100+"%",a.buffered+" "+e*100+"%",a.base+" "+e*100+"%"].join()+")"):nH(this.container,!1)};
function GH(a){if(a.m.length){for(var b=a.player.wa(),c=b.end-b.start,d=["to right"],e=[],f=a.I.seekBarColors.adBreaks,g=!1,h=u(a.m),k=h.next();!k.done;k=h.next())if(k=k.value,k.start==-1&&!k.end)g=!0;else if(!k.end&&k.start>=b.start||typeof k.end=="number"&&k.end>b.start){var l=(Math.max(k.start,b.start)-b.start)/c||0,m=l+.01;k.end&&(m=(k.end-b.start)/c||0);e.push({start:l,end:m})}e=e.sort(function(n,q){return n.start-q.start});b=u(e);for(c=b.next();!c.done;c=b.next())c=c.value,d.push("transparent "+
c.start*100+"%"),d.push(f+" "+c.start*100+"%"),d.push(f+" "+c.end*100+"%"),d.push("transparent "+c.end*100+"%");g&&(d.push("transparent 99%"),d.push(f+" 99%"));a.F.style.background="linear-gradient("+d.join(",")+")"}else a.F.style.background="transparent",a.D.stop()}function KH(a){function b(){GH(a);var c=a.player.wa();c=c.end-c.start;a.player.U()&&c>5&&a.D.xa(.25)}b();a.player.Z||a.eventManager.ua(a.player,"loaded",b)}
function JH(a){var b=a.player.wa();b=b.end-b.start;return a.player.U()&&(b<5||!isFinite(b))?!1:a.ad==null||!a.ad.isLinear()}function IH(a){a.bar.ariaLabel=a.localization.resolve("SEEK")}
function NH(a,b,c){var d=a.j.clientWidth;a.j.style.width="auto";a.j.style.height="20px";a.j.style.top="-30px";a.j.style.left=Math.min(a.bar.offsetWidth-d,Math.max(0,b-d/2))+"px";a.j.style.right="";a.j.style.visibility="visible";b=a.player.wa();a.player.U()?(c=b.end-c,c<1?(a.j.textContent=a.localization.resolve("LIVE"),a.j.style.left="",a.j.style.right="0px"):a.j.textContent="-"+oH(c,c>=3600)):(c-=b.start,a.j.textContent=oH(c,c>=3600))}
function MH(a,b,c){var d,e,f,g,h,k,l,m,n,q,r,t,v,w,z,y,A,C;Q(function(F){switch(F.g){case 1:c<0&&(c=0);d=!1;a.m.length&&(d=a.m.some(function(D){return D.end?c>=D.start&&c<=D.end:!1}));if(d)return HH(a),NH(a,b,c),F.return();e=a.player.wa();f=Math.max(Math.ceil(e.start),Math.min(Math.floor(e.end),c));a.player.U()?(g=e.end-c,a.H.textContent=g<1?a.localization.resolve("LIVE"):"-"+oH(g,g>=3600)):a.H.textContent=oH(c,c>=3600);return E(F,a.player.bj(null,f),2);case 2:h=F.h;if(!h||!h.uris||!h.uris.length)return HH(a),
NH(a,b,c),F.return();h.width<h.height?a.h.classList.add("portrait-thumbnail"):a.h.classList.remove("portrait-thumbnail");k=-10;l=a.h.clientWidth;m=Math.floor(l*9/16);a.h.style.height=m+"px";a.h.style.top=-(m-k)+"px";n=Math.min(a.bar.offsetWidth-l,Math.max(0,b-l/2));a.h.style.left=n+"px";a.h.style.visibility="visible";q=h.uris[0].split("#xywh=")[0];if(a.u&&q===a.u.uris[0].split("#xywh=")[0]&&h.startByte==a.u.startByte&&h.endByte==a.u.endByte){F.B(3);break}a.u=h;a.l&&(a.l.abort(),a.l=null);if(h.codecs!=
"mjpg"&&!q.startsWith("offline:")){F.B(4);break}a.g.src='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg"/>';sa(F,5);r=ph;t=Xm(h.uris,h.startByte,h.endByte,a.player.getConfiguration().streaming.retryParameters);a.l=a.player.Xb().request(r,t,{type:1});return E(F,a.l.promise,7);case 7:v=F.h;a.l=null;h.codecs=="mjpg"?(w=(new yh).box("mdat",Ih(function(D){q=URL.createObjectURL(new Blob([D],{type:"image/jpeg"}))},!0)),w.parse(v.data,!1)):(z=h.mimeType||"image/jpeg",y=new Blob([v.data],{type:z}),
q=URL.createObjectURL(y));ua(F,4);break;case 5:A=va(F);if(A.code==7001)return F.return();throw A;case 4:try{a.h.removeChild(a.g)}catch(D){}a.g=W("img");a.g.id="shaka-player-ui-thumbnail-image";a.g.draggable=!1;a.g.src=q;a.g.onload=function(){q.startsWith("blob:")&&URL.revokeObjectURL(q)};a.h.insertBefore(a.g,a.h.firstChild);case 3:C=l/h.width,h.imageHeight?a.g.height=h.imageHeight:h.sprite||(a.g.style.height="100%",a.g.style.objectFit="contain"),h.imageWidth?a.g.width=h.imageWidth:h.sprite||(a.g.style.width=
"100%",a.g.style.objectFit="contain"),a.g.style.left="-"+C*h.positionX+"px",a.g.style.top="-"+C*h.positionY+"px",a.g.style.transform="scale("+C+")",a.g.style.transformOrigin="left top",m=Math.floor(l*h.height/h.width),a.h.style.height=m+"px",a.h.style.top=-(m-k)+"px",H(F)}})}function HH(a){a.h.style.visibility="hidden"}function LH(a){a.j.style.visibility="hidden"}S("shaka.ui.SeekBar",FH);function OH(){}OH.prototype.create=function(a,b){return new FH(a,b)};FH.Factory=OH;function PH(a,b){hH.call(this,a,b);var c=this;this.j=W("div");this.j.classList.add("shaka-skip-ad-container");this.parent.appendChild(this.j);this.h=W("div");this.h.classList.add("shaka-skip-ad-counter");nH(this.h,!1);this.j.appendChild(this.h);this.g=Xj();this.g.classList.add("shaka-skip-ad-button");this.g.disabled=!0;nH(this.g,!1);this.g.classList.add("shaka-no-propagation");this.j.appendChild(this.g);QH(this);this.i=new Gf(function(){if(c.ad.isSkippable()){var d=Math.round(c.ad.getTimeUntilSkippable());
d>0?c.h.textContent=d:(c.i.stop(),nH(c.h,!1))}else RH(c)});this.eventManager.o(this.localization,"locale-updated",function(){QH(c)});this.eventManager.o(this.localization,"locale-changed",function(){QH(c)});this.eventManager.o(this.adManager,"ad-started",function(){SH(c)});this.eventManager.o(this.adManager,"ad-skip-state-changed",function(){c.ad.isSkippable()?c.ad.canSkipNow()&&(c.g.disabled=!1,c.i.stop(),nH(c.h,!1)):RH(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){RH(c)});this.eventManager.o(this.g,
"click",function(){c.ad.skip()});this.ad&&SH(this)}ma(PH,hH);PH.prototype.release=function(){this.i.stop();this.i=null;hH.prototype.release.call(this)};function QH(a){a.g.textContent=a.localization.resolve("SKIP_AD")}function SH(a){a.ad.isSkippable()&&a.ad.needsSkipUI()&&(nH(a.g,!0),nH(a.h,!0),a.h.textContent="",a.i.Ka(),a.i.xa(.5))}function RH(a){a.i.stop();a.g.disabled=!0;nH(a.g,!1);nH(a.h,!1)}S("shaka.ui.SkipAdButton",PH);/*
 @license
 glMatrix: https://github.com/toji/gl-matrix/
 Copyright 2015-2021, Brandon Jones, Colin MacKenzie IV
 SPDX-License-Identifier: MIT
*/
function TH(){var a=new Float32Array(16);a[0]=1;a[5]=1;a[10]=1;a[15]=1;return a}function UH(a,b,c){b=1/Math.tan(b/2);a[0]=b/c;a[1]=0;a[2]=0;a[3]=0;a[4]=0;a[5]=b;a[6]=0;a[7]=0;a[8]=0;a[9]=0;a[11]=-1;a[12]=0;a[13]=0;a[15]=0;c=1/-99.9;a[10]=100.1*c;a[14]=20*c}
function VH(a,b,c){var d=b[0],e=b[1],f=b[2],g=b[3],h=b[4],k=b[5],l=b[6],m=b[7],n=b[8],q=b[9],r=b[10],t=b[11],v=b[12],w=b[13],z=b[14];b=b[15];var y=c[0],A=c[1],C=c[2],F=c[3];a[0]=y*d+A*h+C*n+F*v;a[1]=y*e+A*k+C*q+F*w;a[2]=y*f+A*l+C*r+F*z;a[3]=y*g+A*m+C*t+F*b;y=c[4];A=c[5];C=c[6];F=c[7];a[4]=y*d+A*h+C*n+F*v;a[5]=y*e+A*k+C*q+F*w;a[6]=y*f+A*l+C*r+F*z;a[7]=y*g+A*m+C*t+F*b;y=c[8];A=c[9];C=c[10];F=c[11];a[8]=y*d+A*h+C*n+F*v;a[9]=y*e+A*k+C*q+F*w;a[10]=y*f+A*l+C*r+F*z;a[11]=y*g+A*m+C*t+F*b;y=c[12];A=c[13];
C=c[14];F=c[15];a[12]=y*d+A*h+C*n+F*v;a[13]=y*e+A*k+C*q+F*w;a[14]=y*f+A*l+C*r+F*z;a[15]=y*g+A*m+C*t+F*b}
function WH(a,b){var c=new Float32Array(3),d=b[0],e=b[1],f=b[2],g=b[4],h=b[5],k=b[6],l=b[8],m=b[9],n=b[10];c[0]=Math.sqrt(d*d+e*e+f*f);c[1]=Math.sqrt(g*g+h*h+k*k);c[2]=Math.sqrt(l*l+m*m+n*n);k=1/c[0];l=1/c[1];m=1/c[2];g=b[0]*k;c=b[1]*l;d=b[2]*m;e=b[4]*k;h=b[5]*l;f=b[6]*m;k*=b[8];l*=b[9];b=b[10]*m;m=g+h+b;m>0?(b=Math.sqrt(m+1)*2,a[3]=.25*b,a[0]=(f-l)/b,a[1]=(k-d)/b,a[2]=(c-e)/b):g>h&&g>b?(b=Math.sqrt(1+g-h-b)*2,a[3]=(f-l)/b,a[0]=.25*b,a[1]=(c+e)/b,a[2]=(k+d)/b):h>b?(b=Math.sqrt(1+h-g-b)*2,a[3]=(k-
d)/b,a[0]=(c+e)/b,a[1]=.25*b,a[2]=(f+l)/b):(b=Math.sqrt(1+b-g-h)*2,a[3]=(c-e)/b,a[0]=(k+d)/b,a[1]=(f+l)/b,a[2]=.25*b)}function XH(a,b){var c=b[0],d=b[1],e=b[2];b=b[3];var f=c+c,g=d+d,h=e+e;c*=f;var k=d*f;d*=g;var l=e*f,m=e*g;e*=h;f*=b;g*=b;b*=h;a[0]=1-d-e;a[1]=k+b;a[2]=l-g;a[3]=0;a[4]=k-b;a[5]=1-c-e;a[6]=m+f;a[7]=0;a[8]=l+g;a[9]=m-f;a[10]=1-c-d;a[11]=0;a[12]=0;a[13]=0;a[14]=0;a[15]=1};function YH(){var a=new Float32Array(4);a[3]=1;return a}function ZH(a,b){var c=b[0],d=b[1],e=b[2];b=b[3];var f=c*c+d*d+e*e+b*b;f>0&&(f=1/Math.sqrt(f));a[0]=c*f;a[1]=d*f;a[2]=e*f;a[3]=b*f};function $H(a){var b=[],c=[],d=[],e=Math.PI;a=(a===void 0?0:a)?e/2:e;for(var f=0;f<=100;f++){var g=f*e/100,h=Math.sin(g);g=Math.cos(g);for(var k=0;k<=100;k++){var l=k*2*a/100;b.push(Math.sin(l)*h,g,Math.cos(l)*h);c.push(k/100,f/100)}}for(e=0;e<100;e++)for(a=0;a<100;a++)f=e*101+a,h=f+100+1,d.push(f,h,f+1),d.push(h,h+1,f+1);return{kk:b,gk:c,indices:d}};function aI(a,b,c,d,e){this.i=a;this.ra=b;this.u=c;this.g=d;this.A=new Wc;this.M=YH();this.h=YH();this.ea=this.oa=this.aa=this.l=null;this.F=TH();this.J=TH();this.O=TH();this.W=TH();this.D=null;this.P=!1;this.K=this.C=null;this.sa=this.ya=0;this.Z=this.R=this.T=this.L=null;this.I=this.H=0;this.j=75;this.V=0;this.m=e;this.G=-1;bI(this)}
aI.prototype.release=function(){this.G!=-1&&(this.i.cancelVideoFrameCallback(this.G),this.G=-1);this.A&&(this.A.release(),this.A=null);this.C&&(this.C.stop(),this.C=null);this.K&&(this.K.stop(),this.K=null)};aI.prototype.ae=function(){(this.P=!this.P)||this.g.viewport(0,0,this.u.width,this.u.height);cI(this,!1)};
function bI(a){dI(a);eI(a);fI(a);gI(a);hI(a);Wl(a.i,HTMLMediaElement.HAVE_CURRENT_DATA,a.A,function(){a.i.readyState>=HTMLMediaElement.HAVE_ENOUGH_DATA&&cI(a);if("requestVideoFrameCallback"in a.i){var b=function(){a.G!=-1&&(cI(a),a.G!=-1&&(a.G=a.i.requestVideoFrameCallback(b)))};a.G=a.i.requestVideoFrameCallback(b)}else{var c;a.A.o(a.i,"canplaythrough",function(){cI(a)});a.A.o(a.i,"playing",function(){a.C&&a.C.stop();if(!c){var d=a.ra.Qb();d=u(d);for(var e=d.next();!e.done;e=d.next())(e=e.value.frameRate)&&
(!c||c<e)&&(c=e)}c||(c=60);cI(a);a.C=(new Gf(function(){cI(a)})).Ka().xa(1/c)});a.A.o(a.i,"pause",function(){a.C&&a.C.stop();a.C=null;cI(a)});a.A.o(a.i,"seeked",function(){cI(a)});a.A.o(document,"visibilitychange",function(){cI(a)})}})}
function dI(a){var b=a.F,c=[0,0,0],d=[1,0,0],e=[0,1,0],f=c[0],g=c[1];c=c[2];var h=e[0];var k=e[1];var l=e[2];var m=d[0];e=d[1];var n=d[2];if(Math.abs(f-m)<1E-6&&Math.abs(g-e)<1E-6&&Math.abs(c-n)<1E-6)for(f=0;f<16;f++)b[f]=f%5==0?1:0;else{d=f-m;e=g-e;m=c-n;var q=1/Math.sqrt(d*d+e*e+m*m);d*=q;e*=q;m*=q;n=k*m-l*e;l=l*d-h*m;h=h*e-k*d;(q=Math.sqrt(n*n+l*l+h*h))?(q=1/q,n*=q,l*=q,h*=q):h=l=n=0;k=e*h-m*l;var r=m*n-d*h;var t=d*l-e*n;(q=Math.sqrt(k*k+r*r+t*t))?(q=1/q,k*=q,r*=q,t*=q):t=r=k=0;b[0]=n;b[1]=k;b[2]=
d;b[3]=0;b[4]=l;b[5]=r;b[6]=e;b[7]=0;b[8]=h;b[9]=t;b[10]=m;b[11]=0;b[12]=-(n*f+l*g+h*c);b[13]=-(k*f+r*g+t*c);b[14]=-(d*f+e*g+m*c);b[15]=1}WH(a.M,a.F);a=b=a.W;c=[4,4,4];f=c[0];g=c[1];c=c[2];b[0]=a[0]*f;b[1]=a[1]*f;b[2]=a[2]*f;b[3]=a[3]*f;b[4]=a[4]*g;b[5]=a[5]*g;b[6]=a[6]*g;b[7]=a[7]*g;b[8]=a[8]*c;b[9]=a[9]*c;b[10]=a[10]*c;b[11]=a[11]*c;b[12]=a[12];b[13]=a[13];b[14]=a[14];b[15]=a[15]}
function eI(a){iI(a);a.g.viewport(0,0,a.g.drawingBufferWidth,a.g.drawingBufferHeight);a.g.clearColor(0,0,0,1);a.g.enable(a.g.CULL_FACE);a.g.cullFace(a.g.FRONT);a.g.clear(a.g.COLOR_BUFFER_BIT)}
function fI(a){var b=jI(a,a.g.VERTEX_SHADER),c=jI(a,a.g.FRAGMENT_SHADER);a.l=a.g.createProgram();a.g.attachShader(a.l,b);a.g.attachShader(a.l,c);a.g.linkProgram(a.l);a.m=="cubemap"?(a.T=a.g.getAttribLocation(a.l,"aVertexPosition"),a.R=a.g.getAttribLocation(a.l,"aTextureCoord")):(a.T=a.g.getAttribLocation(a.l,"a_vPosition"),a.g.enableVertexAttribArray(a.T),a.R=a.g.getAttribLocation(a.l,"a_TexCoordinate"),a.g.enableVertexAttribArray(a.R))}
function jI(a,b){switch(b){case a.g.VERTEX_SHADER:var c=a.m=="cubemap"?"attribute vec4 aVertexPosition;\nattribute vec2 aTextureCoord;\nuniform mat4 uModelViewMatrix;\nuniform mat4 uProjectionMatrix;\nvarying highp vec2 vTextureCoord;\nvarying highp vec3 vLighting;\nvoid main(void) {\n  gl_Position = uProjectionMatrix * uModelViewMatrix * aVertexPosition;\n  vTextureCoord = aTextureCoord;\n}":"attribute vec4 a_vPosition;\n// Per-vertex texture coordinate info\nattribute vec2 a_TexCoordinate;\nuniform mat4 u_VPMatrix;\n// Passed into the fragment shader.\nvarying vec2 v_TexCoordinate;\nvarying vec3 pass_position;\nvoid main()\n{\n gl_Position = u_VPMatrix * a_vPosition;\n // Pass through texture coord\n v_TexCoordinate = a_TexCoordinate;\n pass_position = a_vPosition.xyz;\n}";
break;case a.g.FRAGMENT_SHADER:c=a.m=="cubemap"?"varying highp vec2 vTextureCoord;\nuniform sampler2D uSampler;\nvoid main(void) {\n  highp vec4 texelColor = texture2D(uSampler, vTextureCoord);\n  gl_FragColor = vec4(texelColor.rgb , texelColor.a);\n}":"precision highp float;\n#define PI 3.141592653589793238462643383279\nvarying vec2 v_TexCoordinate;\nvarying vec3 pass_position;\nuniform sampler2D uSampler;\nvoid main(void) {\nhighp float xValue =\n      (PI + atan(pass_position.z, pass_position.x)) / (2.0 * PI);\n vec2 tc = vec2(xValue, v_TexCoordinate.t);\n tc = vec2(tc.x , tc.y);\nhighp vec4 texelColor =\n      texture2D(uSampler, tc);\n  gl_FragColor = vec4(texelColor.rgb, texelColor.a);\n}";
break;default:return null}b=a.g.createShader(b);a.g.shaderSource(b,c);a.g.compileShader(b);return b}
function gI(a){a.L=a.m=="cubemap"?{kk:[-1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,-1,1,-1,-1,1,1,1,1,1,1,1,-1,-1,-1,1,1,-1,1,1,1,1,-1,1,1,1,-1,-1,1,1,-1,1,1,1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,-1],gk:[2/3,.5,1/3,.5,1/3,0,2/3,0,2/3,.5,2/3,0,1,0,1,.5,1,1,2/3,1,2/3,.5,1,.5,0,.5,0,0,1/3,0,1/3,.5,0,.5,1/3,.5,1/3,1,0,1,1/3,1,1/3,.5,2/3,.5,2/3,1],indices:[0,1,2,0,2,3,4,5,6,4,6,7,8,9,10,8,10,11,12,13,14,12,14,15,16,17,18,16,18,19,20,21,22,20,22,23]}:a.m=="halfequirectangular"?$H(!0):
$H();a.aa=a.g.createBuffer();a.g.bindBuffer(a.g.ARRAY_BUFFER,a.aa);a.g.bufferData(a.g.ARRAY_BUFFER,new Float32Array(a.L.kk),a.g.STATIC_DRAW);a.oa=a.g.createBuffer();a.g.bindBuffer(a.g.ARRAY_BUFFER,a.oa);a.g.bufferData(a.g.ARRAY_BUFFER,new Float32Array(a.L.gk),a.g.STATIC_DRAW);a.ea=a.g.createBuffer();a.g.bindBuffer(a.g.ELEMENT_ARRAY_BUFFER,a.ea);a.g.bufferData(a.g.ELEMENT_ARRAY_BUFFER,new Uint16Array(a.L.indices),a.g.STATIC_DRAW)}
function hI(a){a.Z=a.g.createTexture();a.g.bindTexture(a.g.TEXTURE_2D,a.Z);a.g.texParameteri(a.g.TEXTURE_2D,a.g.TEXTURE_WRAP_S,a.g.CLAMP_TO_EDGE);a.g.texParameteri(a.g.TEXTURE_2D,a.g.TEXTURE_WRAP_T,a.g.CLAMP_TO_EDGE);a.g.texParameteri(a.g.TEXTURE_2D,a.g.TEXTURE_MIN_FILTER,a.g.NEAREST);a.g.texParameteri(a.g.TEXTURE_2D,a.g.TEXTURE_MAG_FILTER,a.g.NEAREST)}
function cI(a,b){b=b===void 0?!0:b;var c=a.ra.l==Pr;if(!(!a.i||a.i.readyState<2||!c&&a.i.playbackRate==0)){UH(a.J,a.j*Math.PI/180,1.5625);a.m=="cubemap"?UH(a.J,a.j*Math.PI/180,2.5):UH(a.J,a.j*Math.PI/180,1.5625);a.g.useProgram(a.l);a.g.clear(a.g.COLOR_BUFFER_BIT);iI(a);b&&(a.g.activeTexture(a.g.TEXTURE0),a.g.bindTexture(a.g.TEXTURE_2D,a.Z),a.g.pixelStorei(a.g.UNPACK_PREMULTIPLY_ALPHA_WEBGL,0),a.g.texImage2D(a.g.TEXTURE_2D,0,a.g.RGBA,a.g.RGBA,a.g.UNSIGNED_BYTE,a.i));if(a.m=="equirectangular"||a.m==
"halfequirectangular")VH(a.O,a.F,a.W),VH(a.O,a.J,a.O);a.g.bindBuffer(a.g.ARRAY_BUFFER,a.aa);a.g.vertexAttribPointer(a.T,3,a.g.FLOAT,!1,0,0);a.g.enableVertexAttribArray(a.T);a.g.bindBuffer(a.g.ARRAY_BUFFER,a.oa);a.g.vertexAttribPointer(a.R,2,a.g.FLOAT,!1,0,0);a.g.enableVertexAttribArray(a.R);a.g.bindBuffer(a.g.ELEMENT_ARRAY_BUFFER,a.ea);a.m=="cubemap"?(a.g.uniformMatrix4fv(a.g.getUniformLocation(a.l,"uProjectionMatrix"),!1,a.J),a.g.uniformMatrix4fv(a.g.getUniformLocation(a.l,"uModelViewMatrix"),!1,
a.O)):a.g.uniformMatrix4fv(a.g.getUniformLocation(a.l,"u_VPMatrix"),!1,a.O);a.g.uniform1i(a.g.getUniformLocation(a.l,"uSampler"),0);a.P&&a.g.viewport(0,0,a.u.width/2,a.u.height);a.g.drawElements(a.g.TRIANGLES,a.L.indices.length,a.g.UNSIGNED_SHORT,0);a.P&&(a.g.viewport(a.u.width/2,0,a.u.width/2,a.u.height),a.g.drawElements(a.g.TRIANGLES,a.L.indices.length,a.g.UNSIGNED_SHORT,0))}}
function iI(a){var b=a.i.videoWidth;b||(b=a.u.scrollWidth);var c=a.i.videoHeight;c||(c=a.u.scrollHeight);if(a.ya!==b||a.sa!==c){a.u.width=b;a.u.height=c;a.ya=b;a.sa=c;var d=b/c,e=a.J,f=-d,g=1/(d-f);e[0]=0*g;e[1]=0;e[2]=0;e[3]=0;e[4]=0;e[5]=0;e[6]=0;e[7]=0;e[8]=(d+f)*g;e[9]=0;e[10]=-1;e[11]=-1;e[12]=0;e[13]=0;e[14]=-0;e[15]=0;a.J=e;a.g.viewport(0,0,b,c)}}
function kI(a,b,c,d){var e=Infinity,f=90*Math.PI/180;a.m=="halfequirectangular"&&(e=90*Math.PI/180,f/=2);var g=a.m=="cubemap"?a.O:a.F;a.H+=b;a.I+=c;if(a.H<e&&a.H>-e){e=Math.sin(b);b=Math.cos(b);var h=g[0],k=g[1],l=g[2],m=g[3],n=g[8],q=g[9],r=g[10],t=g[11];g!==g&&(g[4]=g[4],g[5]=g[5],g[6]=g[6],g[7]=g[7],g[12]=g[12],g[13]=g[13],g[14]=g[14],g[15]=g[15]);g[0]=h*b-n*e;g[1]=k*b-q*e;g[2]=l*b-r*e;g[3]=m*b-t*e;g[8]=h*e+n*b;g[9]=k*e+q*b;g[10]=l*e+r*b;g[11]=m*e+t*b}else a.H-=b;a.I<f&&a.I>-f?(f=TH(),e=TH(),b=
-1*c,c=Math.sin(b),b=Math.cos(b),h=e[4],k=e[5],l=e[6],m=e[7],n=e[8],q=e[9],r=e[10],t=e[11],e!==f&&(f[0]=e[0],f[1]=e[1],f[2]=e[2],f[3]=e[3],f[12]=e[12],f[13]=e[13],f[14]=e[14],f[15]=e[15]),f[4]=h*b+n*c,f[5]=k*b+q*c,f[6]=l*b+r*c,f[7]=m*b+t*c,f[8]=n*b-h*c,f[9]=q*b-k*c,f[10]=r*b-l*c,f[11]=t*b-m*c,VH(g,f,g)):a.I-=c;c=TH();f=TH();e=Math.sin(d);d=Math.cos(d);b=f[0];h=f[1];k=f[2];l=f[3];m=f[4];n=f[5];q=f[6];r=f[7];f!==c&&(c[8]=f[8],c[9]=f[9],c[10]=f[10],c[11]=f[11],c[12]=f[12],c[13]=f[13],c[14]=f[14],c[15]=
f[15]);c[0]=b*d+m*e;c[1]=h*d+n*e;c[2]=k*d+q*e;c[3]=l*d+r*e;c[4]=m*d-b*e;c[5]=n*d-h*e;c[6]=q*d-k*e;c[7]=r*d-l*e;VH(g,c,g);cI(a,!1)}
function lI(a,b){if(b===void 0||b)WH(a.h,a.F),a.V=0,a.D=YH(),a.D[0]=(a.h[0]-a.M[0])/20,a.D[1]=(a.h[1]-a.M[1])/20,a.D[2]=(a.h[2]-a.M[2])/20,a.D[3]=(a.h[3]-a.M[3])/20;a.h[0]-=a.D[0];a.h[1]-=a.D[1];a.h[2]-=a.D[2];a.h[3]-=a.D[3];b=TH();ZH(a.h,a.h);XH(b,a.h);a.F=b;a.K&&(a.K.stop(),a.K=null);a.V<20?a.K=(new Gf(function(){lI(a,!1);a.H=0;a.I=0;a.V++;cI(a,!1)})).Y(.025):(XH(b,a.M),a.F=b)};function mI(a,b,c,d,e){mb.call(this);var f=this;this.i=a;this.l=b;this.G=c;this.K=d;this.A=e;this.u=new Wc;this.h=new Wc;this.C=nI(this.l);this.g=null;this.m=!1;this.J=this.I=this.H=this.F=this.D=0;this.j=null;this.u.o(d,"loading",function(){f.g&&lI(f.g);oI(f)});this.u.o(d,"spatialvideoinfo",function(g){g=g.detail;switch(g.projection){case "rect":f.j=null;break;case "equi":f.j="equirectangular";break;case "hequ":switch(g.hfov){case 360:f.j="equirectangular";break;case 180:f.j="halfequirectangular";
break;default:g.hfov==null?f.j="halfequirectangular":f.j=null}break;case "fish":f.j="halfequirectangular";break;default:f.j=null}oI(f)});this.u.o(d,"nospatialvideoinfo",function(){f.j=null;oI(f)});this.u.o(d,"unloading",function(){f.j=null;oI(f)});oI(this)}ma(mI,mb);p=mI.prototype;p.release=function(){this.u&&(this.u.release(),this.u=null);this.h&&(this.h.release(),this.h=null);this.g&&(this.g.release(),this.g=null);mb.prototype.release.call(this)};p.configure=function(a){this.A=a;oI(this)};
p.Ng=function(){return this.l?!!this.C:!!nI(document.createElement("canvas"))};p.Zb=function(){return!!this.g};p.ae=function(){this.g?this.g.ae():bb("Not playing VR content")};p.Ch=function(a){this.g?kI(this.g,a*pI,0,0):bb("Not playing VR content")};p.Ah=function(a){this.g?kI(this.g,0,a*pI,0):bb("Not playing VR content")};p.Bh=function(a){this.g?kI(this.g,0,0,a*pI):bb("Not playing VR content")};
function oI(a){if(a.A.displayInVrMode||a.j){a.l||(a.l=document.createElement("canvas"),a.l.classList.add("shaka-vr-canvas-container"),a.G.parentElement.insertBefore(a.l,a.G.nextElementSibling),a.C=nI(a.l));var b=a.j||a.A.defaultVrProjectionMode;a.g?a.g.m!=b&&(a.h.Sa(),a.g.release(),qI(a,b)):(a.l.style.display="",qI(a,b),a.dispatchEvent(new T("vrstatuschanged",(new Map).set("newStatus",a.Zb()))))}else!a.A.displayInVrMode&&!a.j&&a.l&&a.g&&(a.l.style.display="none",a.h.Sa(),a.g.release(),a.g=null,a.dispatchEvent(new T("vrstatuschanged",
(new Map).set("newStatus",a.Zb()))))}function qI(a,b){a.C&&a.l&&(a.g=new aI(a.G,a.K,a.l,a.C,b),rI(a))}function nI(a){if(!a)return null;var b=Tb().Oa();if(b=="TV"||b=="CONSOLE"||b=="CAST")return null;b=u(["webgl2","webgl"]);for(var c=b.next();!c.done;c=b.next())if(c=a.getContext(c.value))return c;return null}
function rI(a){a.h.o(a.i,"mousedown",function(d){if(!a.m){var e=d.clientX;d=d.clientY;a.m=!0;a.D=e;a.F=d}});navigator.maxTouchPoints>0&&a.h.o(a.i,"touchstart",function(d){if(!a.m){var e=d.touches[0].clientX;d=d.touches[0].clientY;a.m=!0;a.D=e;a.F=d}});a.h.o(a.i,"wheel",function(d){if(!a.m){var e=a.g,f=d.deltaY;f/=50;e.j>=20&&e.j<=100&&(e.j+=f);e.j<20?e.j=20:e.j>100&&(e.j=100);cI(e,!1);d.preventDefault();d.stopPropagation()}});a.h.o(a.i,"mousemove",function(d){a.m&&sI(a,d.clientX,d.clientY)});navigator.maxTouchPoints>
0&&a.h.o(a.i,"touchmove",function(d){a.m&&sI(a,d.touches[0].clientX,d.touches[0].clientY);d.preventDefault()});a.h.o(a.i,"mouseleave",function(){a.m=!1});a.h.o(a.i,"mouseup",function(){a.m=!1});navigator.maxTouchPoints>0&&a.h.o(a.i,"touchend",function(){a.m=!1});var b=!1;if(window.DeviceOrientationEvent)if(typeof DeviceMotionEvent.requestPermission=="function"){var c=function(){DeviceMotionEvent.requestPermission().then(function(d){d!=="granted"||b||(b=!0,tI(a))})};DeviceMotionEvent.requestPermission().then(function(d){a.h.Ea(a.i,
"click",c);a.h.Ea(a.i,"mouseup",c);navigator.maxTouchPoints>0&&a.h.Ea(a.i,"touchend",c);d!=="granted"?(a.h.ua(a.i,"click",c),a.h.ua(a.i,"mouseup",c),navigator.maxTouchPoints>0&&a.h.ua(a.i,"touchend",c)):(b=!0,tI(a))}).catch(function(){a.h.Ea(a.i,"click",c);a.h.Ea(a.i,"mouseup",c);navigator.maxTouchPoints>0&&a.h.Ea(a.i,"touchend",c);a.h.ua(a.i,"click",c);a.h.ua(a.i,"mouseup",c);navigator.maxTouchPoints>0&&a.h.ua(a.i,"touchend",c)})}else b=!0,tI(a)}
function tI(a){a.h.o(window,"deviceorientation",function(b){if(a.g){var c=(b.alpha||0)-a.H,d=(b.beta||0)-a.I,e=(b.gamma||0)-a.J;if(Math.abs(c)>10||Math.abs(d)>10||Math.abs(e)>5)d=e=c=0;a.H=b.alpha||0;a.I=b.beta||0;a.J=b.gamma||0;b=screen.orientation.angle;b==90||b==-90?kI(a.g,c*pI*-1,e*pI*-1,0):kI(a.g,c*pI*-1,d*pI,0)}})}function sI(a,b,c){var d=-.6*Math.PI/180;kI(a.g,(b-a.D)*d,(c-a.F)*-1*d,0);a.D=b;a.F=c}var pI=Math.PI/180;function Z(a,b,c,d,e){mb.call(this);var f=this;this.aa=!0;this.g=e;this.F=new lu(c,a,this.g.castReceiverAppId,this.g.castAndroidReceiverCompatible);this.sa=!0;this.C=this.F.Wc();this.u=c;this.m=this.F.Yb();this.ea=a;this.l=b;this.pb=d;this.ra=this.m.vf();this.A=this.j=null;this.V=!1;this.K=[];this.fb=[];this.Na=!1;this.L=new Gf(function(){f.l.classList.add("no-cursor");f.Na=!1;uI(f)});this.oa=new Gf(function(){f.i.removeAttribute("shown");vI(f);wI(f);f.Z&&f.Z.Oi();f.P.Y(f.g.closeMenusDelay)});this.P=
new Gf(function(){for(var g=u(f.K),h=g.next();!h.done;h=g.next())nH(h.value,!1);f.g.enableTooltips&&f.H.classList.add("shaka-tooltips-on")});this.Fa=new Gf(function(){f.Ca()&&xI(f)});this.R=null;this.J=[];this.ya=yI();this.h=new Wc;this.D=null;this.configure(this.g);zI(this);AI(this);this.W=new Set;BI(this);this.Fa.xa(this.g.refreshTickInSeconds);this.h.o(this.ya,"locale-changed",function(g){g=g.locales[0];f.ra.setLocale(g);f.l.setAttribute("lang",g)});this.ra.initInterstitial(this.G,this.ea,this.u);
this.h.o(this.m,"texttrackvisibility",function(){wI(f)});this.h.o(this.m,"unloading",function(){f.j||(f.yb()&&CI(f),f.Nd()&&f.ed())})}ma(Z,mb);p=Z.prototype;
p.destroy=function(a){a=a===void 0?!1:a;var b=this;return Q(function(c){switch(c.g){case 1:if(document.pictureInPictureElement!=b.u){c.B(2);break}return E(c,document.exitPictureInPicture(),2);case 2:b.h&&(b.h.release(),b.h=null);b.L&&(b.L.stop(),b.L=null);b.oa&&(b.oa.stop(),b.oa=null);b.P&&(b.P.stop(),b.P=null);b.Fa&&(b.Fa.stop(),b.Fa=null);b.D&&(b.D.release(),b.D=null);DI(b);b.i&&(b.l.removeChild(b.i),b.i=null);if(!b.F){c.B(4);break}return E(c,b.F.destroy(a),5);case 5:b.F=null;case 4:b.M&&(b.l.removeChild(b.M),
b.M=null);b.G&&(b.l.removeChild(b.G),b.G=null);b.I&&(b.l.removeChild(b.I),b.I=null);if(!b.ea){c.B(6);break}return E(c,b.ea.destroy(),7);case 7:b.ea=null;case 6:b.m=null,b.u=null,b.C=null,b.ya=null,b.W.clear(),EI(b),mb.prototype.release.call(b),H(c)}})};function DI(a){for(var b=u(a.J),c=b.next();!c.done;c=b.next())c.value.release();a.J=[]}function FI(a,b){GI.set(a,b)}p.tk=function(a){this.sa=a;BI(this)};p.Ul=function(){uI(this)};
p.configure=function(a){var b=this;this.g=a;this.F.Mi(a.castReceiverAppId,a.castAndroidReceiverCompatible);this.A&&(this.A=null);this.La&&(this.La=null);this.Z&&(this.Z=null);this.D&&this.D.configure(a);this.i?(bk(this.i),DI(this)):(HI(this),II(this),this.D=new mI(this.i,this.pb,this.u,this.m,this.g));this.l.classList.add("shaka-video-container");this.u.classList.add("shaka-video");JI(this);this.g.addBigPlayButton&&KI(this);this.g.customContextMenu&&(this.Z=new qH(this.H,this),this.J.push(this.Z));
this.M||LI(this);this.g.seekOnTaps&&(MI(this),NI(this));OI(this);this.K=Array.from(this.l.getElementsByClassName("shaka-settings-menu"));this.K.push.apply(this.K,x(Array.from(this.l.getElementsByClassName("shaka-overflow-menu"))));this.fb=Array.from(this.l.getElementsByClassName("shaka-show-controls-on-mouse-over"));uI(this);a=u(this.l.getElementsByClassName("shaka-no-propagation"));for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=function(e){return e.stopPropagation()};this.h.o(c,"click",d);
this.h.o(c,"dblclick",d);navigator.maxTouchPoints>0&&this.h.o(c,"touchend",function(e){b.Ca()&&e.stopPropagation()})}};p.di=function(a){(this.aa=a)?(this.l.setAttribute("shaka-controls","true"),this.u.tabIndex=-1,this.u.controls=!1):this.l.removeAttribute("shaka-controls");uI(this)};p.Rj=function(a){this.u.controls=a;this.u.tabIndex=a?0:-1;a&&this.di(!1)};p.getAd=function(){return this.j};p.Jk=function(){return this.F};p.cl=function(){return this.ya};p.Fl=function(){return this.l};p.Wc=function(){return this.C};
p.al=function(){return this.u};p.Yb=function(){return this.m};p.$k=function(){return this.ea};p.Qk=function(){return this.i};p.vl=function(){return this.I};p.Mk=function(){return this.G};p.Nk=function(){return this.g};p.Rl=function(){return this.V};p.ii=function(a){(this.V=a)?this.L.stop():this.L.Y(3)};p.Ll=function(){return this.sa};p.rh=function(){return this.A?this.A.getValue():this.C.currentTime};p.Sj=function(a){this.R=a};p.Nc=function(){return this.K.some(function(a){return!a.classList.contains("shaka-hidden")})};
p.Xc=function(){this.P.Ka()};function PI(a){return!document.fullscreenEnabled||a.u.webkitSupportsFullscreen&&a.g.preferVideoFullScreenInVisionOS&&Tb().Oa()=="APPLE_VR"?!1:!0}function QI(a){return"documentPictureInPicture"in window&&a.g.preferDocumentPictureInPicture}p.xe=function(){return this.F.Qa()?!1:PI(this)||(!this.j||!this.j.isUsingAnotherMediaElement())&&this.u.webkitSupportsFullscreen?!0:!1};
p.yb=function(){if(PI(this))return!!document.fullscreenElement;var a=this.u;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1};
function RI(a){var b,c,d;return Q(function(e){switch(e.g){case 1:sa(e,2);if(!PI(a)){b=a.u;b.webkitSupportsFullscreen&&b.webkitEnterFullscreen();e.B(4);break}if(!a.Nd()){e.B(5);break}return E(e,a.ed(),6);case 6:if(!QI(a)){e.B(5);break}return E(e,new Promise(function(f){(new Gf(f)).Y(.05)}),5);case 5:return c=a.g.fullScreenElement,E(e,c.requestFullscreen({navigationUI:"hide"}),9);case 9:if(!a.g.forceLandscapeOnFullscreen||!screen.orientation){e.B(4);break}sa(e,11);return E(e,screen.orientation.lock("landscape"),
13);case 13:ua(e,4,2);break;case 11:va(e,2);case 4:ua(e,0);break;case 2:d=va(e),a.dispatchEvent(new T("error",(new Map).set("detail",d))),H(e)}})}function CI(a){var b;return Q(function(c){if(!PI(a))return b=a.u,b.webkitSupportsFullscreen&&b.webkitExitFullscreen(),c.B(0);screen.orientation&&screen.orientation.unlock();return E(c,document.exitFullscreen(),0)})}p.qg=function(){var a=this;return Q(function(b){return a.yb()?E(b,CI(a),0):E(b,RI(a),0)})};
p.Gf=function(){return this.F.Qa()?!1:document.pictureInPictureEnabled||QI(this)?!this.u.disablePictureInPicture:!1};p.Nd=function(){return!!(window.documentPictureInPicture&&window.documentPictureInPicture.window||document.pictureInPictureElement)};
p.ed=function(){var a=this,b,c;return Q(function(d){switch(d.g){case 1:sa(d,2);if(QI(a)){if(!a.yb()){d.B(10);break}return E(d,CI(a),10)}return document.pictureInPictureElement?E(d,document.exitPictureInPicture(),5):(a.yb()&&CI(a),b=a.u,E(d,b.requestPictureInPicture(),5));case 10:return E(d,SI(a),5);case 5:ua(d,0);break;case 2:c=va(d),a.dispatchEvent(new T("error",(new Map).set("detail",c))),H(d)}})};
function SI(a){var b,c,d,e,f,g;return Q(function(h){if(h.g==1){if(window.documentPictureInPicture.window)return window.documentPictureInPicture.window.close(),h.return();b=a.l;c=b.getBoundingClientRect();return E(h,window.documentPictureInPicture.requestWindow({width:c.width,height:c.height}),2)}d=h.h;TI(d);e=b.parentNode||document.body;f=a.l.cloneNode(!0);f.style.visibility="hidden";f.style.height=getComputedStyle(b).height;e.appendChild(f);g=document.createElement("style");g.append("[data-shaka-player-container] {\n      width: 100% !important; max-height: 100%}");
d.document.head.append(g);d.document.body.append(b);a.h.ua(d,"pagehide",function(){f.replaceWith(b)});H(h)})}
function TI(a){var b=[].concat(x(document.styleSheets)).map(function(d){try{return[].concat(x(d.cssRules)).map(function(f){return f.cssText}).join("")}catch(f){var e=document.createElement("link");e.rel="stylesheet";e.type=d.type;e.media=d.media;e.href=d.href;a.document.head.appendChild(e)}return""}).filter(Boolean).join("\n"),c=document.createElement("style");c.textContent=b;a.document.head.appendChild(c)}
p.Xj=function(){nH(this.T,!0);this.G&&this.G.hasChildNodes()&&nH(this.G,!0);this.I&&this.I.hasChildNodes()&&nH(this.I,!0);this.j.hasCustomClick()?this.i.setAttribute("ad-active","true"):this.i.removeAttribute("ad-active")};p.cj=function(){nH(this.T,!1);nH(this.G,!1);nH(this.I,!1);this.i.removeAttribute("ad-active")};
function wH(a){if(a.aa){if(a.j&&(a.j&&a.j.isPaused()?a.j.play():a.j&&a.j.pause(),a.j.isLinear()))return;a.C.duration&&(a.C.paused&&!a.V?(a.m.isEnded()&&(a.C.currentTime=a.m.wa().start),a.C.play()):a.C.pause())}}
function HI(a){a.i=W("div");a.i.classList.add("shaka-controls-container");a.l.appendChild(a.i);a.l.setAttribute("shaka-controls","true");a.h.o(a.i,"touchend",function(b){a.C.duration&&(a.Ca()?(a.R=Date.now(),zH(a,!0)):UI(a,b),b.cancelable&&b.preventDefault())});a.h.o(a.i,"click",function(){zH(a)});a.h.o(a.i,"dblclick",function(){a.g.doubleClickForFullscreen&&a.xe()&&a.qg()})}
function KI(a){var b=W("div");b.classList.add("shaka-play-button-container");a.i.appendChild(b);a.La=new xH(b,a);a.J.push(a.La)}function JI(a){var b=W("div");b.classList.add("shaka-scrim-container");a.i.appendChild(b)}function VI(a){a.T=W("div");a.T.classList.add("shaka-ad-controls");var b=a.j!=null&&a.j.isLinear();nH(a.T,b);a.O.appendChild(a.T);b=new PH(a.T,a);a.J.push(b)}
function LI(a){a.M=W("div");a.M.classList.add("shaka-spinner-container");a.l.appendChild(a.M);var b=W("div");b.classList.add("shaka-spinner");a.M.appendChild(b);b.insertAdjacentHTML("beforeend",'<svg focusable="false" stroke="currentColor"\n         viewBox="0 0 38 38" xmlns="http://www.w3.org/2000/svg"\n         width="50px" height="50px" class="q-spinner text-grey-9">\n      <g transform="translate(1 1)" stroke-width="6" fill="none"\n        fill-rule="evenodd">\n        <circle stroke-opacity=".5" cx="18" cy="18" r="16"></circle>\n        <path d="M34 18c0-9.94-8.06-16-16-16">\n          <animateTransform attributeName="transform" type="rotate"\n            from="0 18 18" to="360 18 18" dur="1s" repeatCount="indefinite">\n          </animateTransform>\n        </path>\n      </g>\n    </svg>')}
function MI(a){var b=W("div");b.classList.add("shaka-hidden-fast-forward-container");a.i.appendChild(b);a.ib=new AH(b,a);a.J.push(a.ib)}function NI(a){var b=W("div");b.classList.add("shaka-hidden-rewind-container");a.i.appendChild(b);a.jb=new BH(b,a);a.J.push(a.jb)}
function OI(a){a.O=W("div");a.O.classList.add("shaka-bottom-controls");a.O.classList.add("shaka-no-propagation");a.i.appendChild(a.O);a.h.o(a.O,"click",function(e){e.target.closest(".shaka-overflow-button")||a.Xc()});VI(a);WI(a);a.H=W("div");a.H.classList.add("shaka-controls-button-panel");a.H.classList.add("shaka-show-controls-on-mouse-over");a.g.enableTooltips&&a.H.classList.add("shaka-tooltips-on");a.O.appendChild(a.H);for(var b=u(a.g.controlPanelElements),c=b.next();!c.done;c=b.next())if(c=c.value,
GI.get(c)){var d=GI.get(c).create(a.H,a);a.J.push(d);c=="time_and_duration"&&(c=new pH(a.H,a),a.J.push(c))}else bb("Unrecognized control panel element requested:",c)}function WI(a){if(a.g.addSeekBar)a.A=XI.create(a.O,a),a.J.push(a.A);else{for(var b=u(a.K),c=b.next();!c.done;c=b.next())c.value.classList.add("shaka-low-position");a=a.H;a.classList.contains("shaka-tooltips-on")&&a.classList.add("shaka-tooltips-low-position")}}
function II(a){a.G=W("div");a.G.classList.add("shaka-client-side-ad-container");nH(a.G,!1);a.h.o(a.G,"click",function(){zH(a)});a.l.appendChild(a.G);a.I=W("div");a.I.classList.add("shaka-server-side-ad-container");nH(a.I,!1);a.h.o(a.I,"click",function(){zH(a)});a.l.appendChild(a.I)}
function zI(a){a.h.o(a.m,"buffering",function(){YI(a)});YI(a);a.h.o(window,"keydown",function(b){ZI(a,b)});a.h.o(window,"click",function(){return a.Xc()});a.h.o(a,"submenuopen",function(){a.Xc()});a.h.o(a.C,"play",function(){uI(a)});a.h.o(a.C,"pause",function(){uI(a)});a.h.o(a.l,"mousemove",function(b){UI(a,b)});a.h.o(a.l,"touchmove",function(b){UI(a,b)},{passive:!0});a.h.o(a.l,"touchend",function(b){UI(a,b)},{passive:!0});a.h.o(a.l,"mouseleave",function(){a.R||a.L.Ka()});a.h.o(a.l,"wheel",function(b){UI(a,
b)},{passive:!0});a.h.o(a.F,"caststatuschanged",function(){BI(a)});a.h.o(a.D,"vrstatuschanged",function(){a.dispatchEvent(new T("vrstatuschanged"))});a.h.o(a.l,"keydown",function(b){a.g.enableKeyboardPlaybackControlsInWindow||a.yb()||$I(a,b)});a.h.o(a.l,"keyup",function(b){a.g.enableKeyboardPlaybackControlsInWindow||a.yb()||a.W.delete(b.key)});a.h.o(window,"keydown",function(b){(a.g.enableKeyboardPlaybackControlsInWindow||a.yb())&&$I(a,b)});a.h.o(window,"keyup",function(b){(a.g.enableKeyboardPlaybackControlsInWindow||
a.yb())&&a.W.delete(b.key)});a.h.o(a.ra,"ad-started",function(b){a.j=b.ad;a.Xj();YI(a)});a.h.o(a.ra,"ad-stopped",function(){a.j=null;a.cj();YI(a)});screen.orientation&&a.h.o(screen.orientation,"change",function(){return Q(function(b){return E(b,aJ(a),0)})})}
function AI(a){if(a.g.setupMediaSession&&navigator.mediaSession){var b=function(f,g){try{navigator.mediaSession.setActionHandler(f,function(h){g(h)})}catch(h){}},c=function(){if(a.j&&a.j.isLinear())d();else{var f=a.m.wa(),g=f.end-f.start;f=parseFloat((a.C.currentTime-f.start).toFixed(2));a.m.U()&&Math.abs(g-f)<1&&(g=Infinity);try{navigator.mediaSession.setPositionState({duration:Math.max(0,g),playbackRate:a.C.playbackRate,position:Math.max(0,f)})}catch(h){}}},d=function(){try{navigator.mediaSession.setPositionState()}catch(f){}},
e=function(f){var g=a.g.keyboardSeekDistance;switch(f.action){case "pause":wH(a);break;case "play":wH(a);break;case "seekbackward":if(f.seekOffset&&!isFinite(f.seekOffset))break;a.j&&a.j.isLinear()||bJ(a,a.A.getValue()-(f.seekOffset||g));break;case "seekforward":if(f.seekOffset&&!isFinite(f.seekOffset))break;a.j&&a.j.isLinear()||bJ(a,a.A.getValue()+(f.seekOffset||g));break;case "seekto":if(f.seekTime&&!isFinite(f.seekTime))break;a.j&&a.j.isLinear()||bJ(a,a.m.wa().start+f.seekTime);break;case "stop":a.m.vc();
break;case "enterpictureinpicture":a.j&&a.j.isLinear()||a.ed()}};b("pause",e);b("play",e);b("seekbackward",e);b("seekforward",e);b("seekto",e);b("stop",e);("documentPictureInPicture"in window||document.pictureInPictureEnabled)&&b("enterpictureinpicture",e);b=function(){a.m.U()||a.m.wa().start!=0?(c(),a.h.o(a.C,"timeupdate",c)):d()};a.m.Z&&b();a.h.o(a.m,"loaded",b);a.h.o(a.m,"unloading",function(){a.h.Ea(a.C,"timeupdate",c)});a.h.o(a.m,"metadata",function(f){if(f=f.payload){var g;f.key=="TIT2"&&f.data&&
(g=f.data);var h;f.key=="APIC"&&f.mimeType=="--\x3e"&&(h=f.data);g&&(f={title:g,artwork:[]},navigator.mediaSession.metadata&&(f=navigator.mediaSession.metadata,f.title=g),navigator.mediaSession.metadata=new MediaMetadata(f));h&&(g=a.u,h!=g.poster&&(g.poster=h),g={title:"",artwork:[{src:h}]},navigator.mediaSession.metadata&&(g=navigator.mediaSession.metadata,g.artwork=[{src:h}]),navigator.mediaSession.metadata=new MediaMetadata(g))}})}}
function EI(a){if(a.g.setupMediaSession&&navigator.mediaSession){try{navigator.mediaSession.setPositionState()}catch(b){}a=function(b){try{navigator.mediaSession.setActionHandler(b,null)}catch(c){}};a("pause");a("play");a("seekbackward");a("seekforward");a("seekto");a("stop");a("enterpictureinpicture")}}
function aJ(a){return Q(function(b){return a.C&&a.C.readyState!=0&&!a.F.Qa()&&a.g.enableFullscreenOnRotation&&a.xe()?screen.orientation.type.includes("landscape")&&!a.yb()?E(b,RI(a),0):screen.orientation.type.includes("portrait")&&a.yb()?E(b,CI(a),0):b.B(0):b.return()})}
function UI(a,b){b.type=="mousemove"&&(a.i.classList.remove("shaka-keyboard-navigation"),uI(a));b.type=="touchstart"||b.type=="touchmove"||b.type=="touchend"||b.type=="keyup"?a.R=Date.now():a.R+1E3<Date.now()&&(a.R=null);a.R&&b.type=="mousemove"||(a.l.classList.remove("no-cursor"),a.Na=!0,a.P.stop(),a.Ca()||(xI(a),uI(a)),a.L.stop(),b.type!="touchend"&&b.type!="wheel"&&b.type!="keyup"&&a.R||a.L.Y(3))}
function cJ(a){return window.matchMedia("hover: hover").matches?a.fb.some(function(b){return b.matches(":hover")}):!1}function wI(a){var b=a.l.getElementsByClassName("shaka-text-container")[0];b&&(a.Ca()?b.style.bottom=a.O.clientHeight+"px":b.style.bottom="0px")}
function uI(a){var b=a.j?a.j.isPaused():!1,c=a.C.paused&&!a.V,d=a.i.classList.contains("shaka-keyboard-navigation");b||(!a.j||!a.j.isLinear())&&c||a.Na||d||cJ(a)?(xI(a),a.i.getAttribute("shown")==null&&(a.i.setAttribute("shown","true"),vI(a)),wI(a),a.oa.stop()):a.oa.Y(a.g.fadeDelay);a.Nc()&&a.H.classList.remove("shaka-tooltips-on")}function zH(a,b){b=b===void 0?!1:b;a.aa&&!a.Zb()&&(a.Nc()?a.P.Ka():a.g.singleClickForPlayAndPause?wH(a):b&&a.Ca()&&a.dj())}
function BI(a){var b=a.F.Qa();a.dispatchEvent(new T("caststatuschanged",(new Map).set("newStatus",b)));b?a.i.getAttribute("casting")==null&&(a.i.setAttribute("casting","true"),vI(a)):a.i.getAttribute("casting")!=null&&(a.i.removeAttribute("casting"),vI(a))}
function $I(a,b){var c=document.activeElement,d=c&&c.classList?c.classList.contains("shaka-volume-bar"):!1,e=c&&c.classList&&c.classList.contains("shaka-seek-bar"),f=a.yb();c=a.i.contains(c);f=f||a.g.enableKeyboardPlaybackControlsInWindow;c&&UI(a,b);if(a.g.enableKeyboardPlaybackControls&&a.m.kd()){var g=a.g.keyboardSeekDistance,h=a.g.keyboardLargeSeekDistance;switch(b.key){case "ArrowLeft":a.A&&g>0&&(e||f)&&!d&&(b.preventDefault(),bJ(a,a.A.getValue()-g));break;case "ArrowRight":a.A&&g>0&&(e||f)&&
!d&&(b.preventDefault(),bJ(a,a.A.getValue()+g));break;case "PageDown":a.A&&h>0&&(e||f)&&(b.preventDefault(),bJ(a,a.A.getValue()-h));break;case "PageUp":a.A&&h>0&&(e||f)&&(b.preventDefault(),bJ(a,a.A.getValue()+h));break;case "Home":a.A&&bJ(a,a.m.wa().start);break;case "End":a.A&&bJ(a,a.m.wa().end);break;case "c":a.m.$d(!a.m.Yc());break;case "f":a.xe()&&a.qg();break;case "m":a.j&&a.j.isLinear()?a.j.setMuted(!a.j.isMuted()):a.u.muted=!a.u.muted;break;case "p":a.Gf()&&a.ed();break;case ">":b=a.g.playbackRates.indexOf(a.m.Za());
b>-1&&b+1<a.g.playbackRates.length&&a.m.uc(a.g.playbackRates[b+1],!1);break;case "<":b=a.g.playbackRates.indexOf(a.m.Za());b>-1&&b-1>=0&&a.m.uc(a.g.playbackRates[b-1],!1);break;case " ":(e||f&&!c)&&wH(a)}}}function YI(a){a.aa&&(a.j&&a.j.isClientRendering()&&a.j.isLinear()?nH(a.M,!1):nH(a.M,a.m.Ef()))}p.Ca=function(){return this.aa?this.i.getAttribute("shown")!=null||this.i.getAttribute("casting")!=null:!1};
function vI(a){a.Ca()?a.dispatchEvent(new T("showingui")):a.dispatchEvent(new T("hidingui"))}function bJ(a,b){a.C.currentTime=b;xI(a)}
function xI(a){if(a.A)if(a.A.setValue(a.C.currentTime),a.A.update(),a.A.isShowing()){for(var b=u(a.K),c=b.next();!c.done;c=b.next())c.value.classList.remove("shaka-low-position");b=a.H;b.classList.contains("shaka-tooltips-on")&&b.classList.remove("shaka-tooltips-low-position")}else{b=u(a.K);for(c=b.next();!c.done;c=b.next())c.value.classList.add("shaka-low-position");b=a.H;b.classList.contains("shaka-tooltips-on")&&b.classList.add("shaka-tooltips-low-position")}a.dispatchEvent(new T("timeandseekrangeupdated"))}
function ZI(a,b){a.W.add(b.key);var c=a.Nc();b.key=="Tab"&&(a.i.classList.add("shaka-keyboard-navigation"),uI(a),a.h.o(window,"mousedown",function(){a.h.Ea(window,"mousedown")}));b.key=="Escape"&&a.P.Ka();c&&a.W.has("Tab")&&dJ(a,b)}
function dJ(a,b){var c=a.K.filter(function(f){return!f.classList.contains("shaka-hidden")});if(c.length){var d=c[0];if(d.childNodes.length){for(c=d.firstElementChild;c&&c.classList.contains("shaka-hidden");)c=c.nextElementSibling;for(d=d.lastElementChild;d&&d.classList.contains("shaka-hidden");)d=d.previousElementSibling;var e=document.activeElement;a.W.has("Shift")?e==c&&(b.preventDefault(),d.focus()):e==d&&(b.preventDefault(),c.focus())}}}
p.Hm=function(){var a=new Event("mousemove",{bubbles:!1,cancelable:!1});UI(this,a)};p.dj=function(){this.L.Ka()};p.Ng=function(){return this.D.Ng()};p.Zb=function(){return this.D.Zb()};
p.Dl=function(){var a=this.D;if(a.g){a=a.g;WH(a.h,a.F);var b=a.h;a=b[0];var c=b[1],d=b[2];b=b[3];var e=d*d,f=b*b;var g=a*a+c*c+e+f;var h=a*b-c*d;h>.499995*g?(g=Math.PI/2,a=2*Math.atan2(c,a)):h<-.499995*g?(g=-Math.PI/2,a=2*Math.atan2(c,a)):(g=Math.asin(2*(a*d-b*c)),a=Math.atan2(2*(a*b+c*d),1-2*(e+f)));a=Math.acos(Math.cos(a)*Math.cos(g))*180/Math.PI}else bb("Not playing VR content"),a=null;return a};p.Cl=function(){var a=this.D;a.g?a=a.g.j:(bb("Not playing VR content"),a=null);return a};
p.Fm=function(a){var b=this.D;b.g?(a<0?(bb("Field of view should be greater than 0"),a=0):a>100&&(bb("Field of view should be less than 100"),a=100),b=b.g,b.j=a,cI(b,!1)):bb("Not playing VR content")};p.ae=function(){this.D.ae()};p.Ch=function(a){this.D.Ch(a)};p.Ah=function(a){this.D.Ah(a)};p.Bh=function(a){this.D.Bh(a)};
function yI(){var a=new Lc("en");a.Xa("ar",new Map([["AD_DURATION","\u0645\u062f\u0629 \u0627\u0644\u0625\u0639\u0644\u0627\u0646"],["AD_PROGRESS","\u0627\u0644\u0625\u0639\u0644\u0627\u0646 [AD_ON] \u0645\u0646 [NUM_ADS]"],["AD_STATISTICS","\u0625\u062d\u0635\u0627\u0621\u0627\u062a \u0627\u0644\u0625\u0639\u0644\u0627\u0646\u0627\u062a"],["AD_TIME","\u0627\u0644\u0625\u0639\u0644\u0627\u0646: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","\u062a\u0644\u0642\u0627\u0626\u064a"],["BACK","\u0631\u062c\u0648\u0639"],
["CAPTIONS","\u0627\u0644\u062a\u0631\u062c\u0645\u0629 \u0648\u0627\u0644\u0634\u0631\u062d"],["CAST","\u0625\u0631\u0633\u0627\u0644..."],["CHAPTERS","\u0627\u0644\u0641\u0635\u0648\u0644"],["DOWNLOAD_VIDEO_FRAME","\u062d\u0641\u0638 \u0625\u0637\u0627\u0631 \u0627\u0644\u0641\u064a\u062f\u064a\u0648"],["ENTER_LOOP_MODE","\u062a\u0643\u0631\u0627\u0631 \u0627\u0644\u0641\u064a\u062f\u064a\u0648 \u0627\u0644\u062d\u0627\u0644\u064a"],["ENTER_PICTURE_IN_PICTURE",'\u0627\u0644\u062f\u062e\u0648\u0644 \u0641\u064a \u0648\u0636\u0639 "\u0646\u0627\u0641\u0630\u0629 \u0636\u0645\u0646 \u0646\u0627\u0641\u0630\u0629"'],
["EXIT_FULL_SCREEN","\u0625\u0646\u0647\u0627\u0621 \u0648\u0636\u0639 \u0645\u0644\u0621 \u0627\u0644\u0634\u0627\u0634\u0629"],["EXIT_LOOP_MODE","\u0625\u064a\u0642\u0627\u0641 \u062a\u0643\u0631\u0627\u0631 \u0627\u0644\u0641\u064a\u062f\u064a\u0648 \u0627\u0644\u062d\u0627\u0644\u064a"],["EXIT_PICTURE_IN_PICTURE",'\u0627\u0644\u062e\u0631\u0648\u062c \u0645\u0646 \u0648\u0636\u0639 "\u0646\u0627\u0641\u0630\u0629 \u0636\u0645\u0646 \u0646\u0627\u0641\u0630\u0629"'],["FAST_FORWARD","\u062a\u0642\u062f\u064a\u0645 \u0633\u0631\u064a\u0639"],
["FULL_SCREEN","\u0645\u0644\u0621 \u0627\u0644\u0634\u0627\u0634\u0629"],["LANGUAGE","\u0627\u0644\u0644\u063a\u0629"],["LIVE","\u0645\u0628\u0627\u0634\u0631"],["LOOP","\u062a\u0643\u0631\u0627\u0631"],["MORE_SETTINGS","\u0645\u0632\u064a\u062f \u0645\u0646 \u0627\u0644\u0625\u0639\u062f\u0627\u062f\u0627\u062a"],["MULTIPLE_LANGUAGES","\u0644\u063a\u0627\u062a \u0645\u062a\u0639\u062f\u062f\u0629"],["MUTE","\u0643\u062a\u0645 \u0627\u0644\u0635\u0648\u062a"],["NOT_APPLICABLE","\u063a\u064a\u0631 \u0633\u0627\u0631\u064d"],
["OFF","\u0625\u064a\u0642\u0627\u0641"],["ON","\u062a\u0634\u063a\u064a\u0644"],["PAUSE","\u0625\u064a\u0642\u0627\u0641 \u0645\u0624\u0642\u062a"],["PICTURE_IN_PICTURE","\u0646\u0627\u0641\u0630\u0629 \u0636\u0645\u0646 \u0627\u0644\u0646\u0627\u0641\u0630\u0629"],["PLAY","\u0627\u0644\u062a\u0634\u063a\u064a\u0644"],["PLAYBACK_RATE","\u0633\u0631\u0639\u0629 \u0627\u0644\u062a\u0634\u063a\u064a\u0644"],["QUALITY","\u0627\u0644\u062c\u0648\u062f\u0629"],["RECENTER_VR","\u0625\u0639\u0627\u062f\u0629 \u0627\u0644\u062a\u0648\u0633\u064a\u0637"],
["REPLAY","\u0625\u0639\u0627\u062f\u0629 \u0627\u0644\u062a\u0634\u063a\u064a\u0644"],["RESOLUTION","\u062f\u0631\u062c\u0629 \u0627\u0644\u062f\u0642\u0629"],["REWIND","\u062a\u0631\u062c\u064a\u0639"],["SEEK","\u0627\u0644\u0628\u062d\u062b \u0628\u0627\u0644\u062a\u0645\u0631\u064a\u0631"],["SKIP_AD","\u062a\u062e\u0637\u0651\u064a \u0627\u0644\u0625\u0639\u0644\u0627\u0646"],["SKIP_TO_LIVE","\u0627\u0644\u0627\u0646\u062a\u0642\u0627\u0644 \u0625\u0644\u0649 \u0628\u062b \u0645\u0628\u0627\u0634\u0631"],
["STATISTICS","\u0627\u0644\u0625\u062d\u0635\u0627\u0621\u0627\u062a"],["SUBTITLE_FORCED","\u0639\u0631\u0636 \u0625\u062c\u0628\u0627\u0631\u064a"],["SURROUND","\u0635\u0648\u062a \u0645\u062d\u064a\u0637\u064a"],["TOGGLE_STEREOSCOPIC","\u0625\u064a\u0642\u0627\u0641 \u0627\u0644\u0639\u0631\u0636 \u0627\u0644\u0645\u062c\u0633\u0651\u0645 \u0623\u0648 \u062a\u0641\u0639\u064a\u0644\u0647"],["UNDETERMINED_LANGUAGE","\u063a\u064a\u0631 \u0645\u062d\u062f\u062f"],["UNMUTE","\u0625\u0639\u0627\u062f\u0629 \u0627\u0644\u0635\u0648\u062a"],
["UNRECOGNIZED_LANGUAGE","\u063a\u064a\u0631 \u0645\u0639\u0631\u0648\u0641"],["VOLUME","\u0645\u0633\u062a\u0648\u0649 \u0627\u0644\u0635\u0648\u062a"]]));a.Xa("de",new Map([["AD_DURATION","Dauer der Werbeanzeige"],["AD_PROGRESS","Werbung\u00a0[AD_ON] von\u00a0[NUM_ADS]"],["AD_STATISTICS","Anzeigenstatistiken"],["AD_TIME","Werbeanzeige: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","Automatisch"],["BACK","Zur\u00fcck"],["CAPTIONS","Untertitel"],["CAST","Streamen..."],["CHAPTERS","Kapitel"],["DOWNLOAD_VIDEO_FRAME",
"Videoframe speichern"],["ENTER_LOOP_MODE","In Endlosschleife spielen"],["ENTER_PICTURE_IN_PICTURE","Bild im Bild aktivieren"],["EXIT_FULL_SCREEN","Vollbildmodus beenden"],["EXIT_LOOP_MODE","Endlosschleife stoppen"],["EXIT_PICTURE_IN_PICTURE","Bild im Bild beenden"],["FAST_FORWARD","Vorspulen"],["FULL_SCREEN","Vollbildmodus"],["LANGUAGE","Sprache"],["LIVE","Live"],["LOOP","Schleife"],["MORE_SETTINGS","Weitere Einstellungen"],["MULTIPLE_LANGUAGES","Mehrere Sprachen"],["MUTE","Stummschalten"],["NOT_APPLICABLE",
"Nicht zutreffend"],["OFF","Aus"],["ON","Ein"],["PAUSE","Pause"],["PICTURE_IN_PICTURE","Bild im Bild"],["PLAY","Wiedergabe"],["PLAYBACK_RATE","Geschwindigkeit"],["QUALITY","Qualit\u00e4t"],["RECENTER_VR","Zentrieren"],["REPLAY","Noch einmal wiedergeben"],["RESOLUTION","Aufl\u00f6sung"],["REWIND","Zur\u00fcckspulen"],["SEEK","Suche"],["SKIP_AD","\u00dcberspringen"],["SKIP_TO_LIVE","Zum Live-Videostream wechseln"],["STATISTICS","Statistiken"],["SUBTITLE_FORCED","Erzwungen"],["SURROUND","Surround"],
["TOGGLE_STEREOSCOPIC","Einstellung \u201estereoskopisch\u201c ein\u2011/ausschalten"],["UNDETERMINED_LANGUAGE","Unbestimmt"],["UNMUTE","Stummschaltung aufheben"],["UNRECOGNIZED_LANGUAGE","Unbekannt"],["VOLUME","Lautst\u00e4rke"]]));a.Xa("en",new Map([["AD_DURATION","Ad duration"],["AD_PROGRESS","Ad [AD_ON] of [NUM_ADS]"],["AD_STATISTICS","Ad statistics"],["AD_TIME","Ad: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","Auto"],["BACK","Back"],["CAPTIONS","Captions"],["CAST","Cast..."],["CHAPTERS",
"Chapters"],["DOWNLOAD_VIDEO_FRAME","Save video frame"],["ENTER_LOOP_MODE","Loop the current video"],["ENTER_PICTURE_IN_PICTURE","Enter Picture-in-Picture"],["EXIT_FULL_SCREEN","Exit full screen"],["EXIT_LOOP_MODE","Stop looping the current video"],["EXIT_PICTURE_IN_PICTURE","Exit Picture-in-Picture"],["FAST_FORWARD","Fast-forward"],["FULL_SCREEN","Full screen"],["LANGUAGE","Language"],["LIVE","Live"],["LOOP","Loop"],["MORE_SETTINGS","More settings"],["MULTIPLE_LANGUAGES","Multiple languages"],["MUTE",
"Mute"],["NOT_APPLICABLE","Not applicable"],["OFF","Off"],["ON","On"],["PAUSE","Pause"],["PICTURE_IN_PICTURE","Picture-in-Picture"],["PLAY","Play"],["PLAYBACK_RATE","Playback speed"],["QUALITY","Quality"],["RECENTER_VR","Recenter"],["REPLAY","Replay"],["RESOLUTION","Resolution"],["REWIND","Rewind"],["SEEK","Seek"],["SKIP_AD","Skip Ad"],["SKIP_NEXT","Next"],["SKIP_PREVIOUS","Previous"],["SKIP_TO_LIVE","Skip ahead to live"],["STATISTICS","Statistics"],["SUBTITLE_FORCED","Forced"],["SURROUND","Surround"],
["TOGGLE_STEREOSCOPIC","Toggle stereoscopic"],["UNDETERMINED_LANGUAGE","Undetermined"],["UNMUTE","Unmute"],["UNRECOGNIZED_LANGUAGE","Unrecognized"],["VOLUME","Volume"]]));a.Xa("en-GB",new Map([["AD_DURATION","Ad duration"],["AD_PROGRESS","Ad [AD_ON] of [NUM_ADS]"],["AD_STATISTICS","Ad statistics"],["AD_TIME","Ad: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","Auto"],["BACK","Back"],["CAPTIONS","Captions"],["CAST","Cast..."],["CHAPTERS","Chapters"],["DOWNLOAD_VIDEO_FRAME","Save video frame"],["ENTER_LOOP_MODE",
"Loop the current video"],["ENTER_PICTURE_IN_PICTURE","Enter picture-in-picture"],["EXIT_FULL_SCREEN","Exit full screen"],["EXIT_LOOP_MODE","Stop looping the current video"],["EXIT_PICTURE_IN_PICTURE","Exit picture-in-picture"],["FAST_FORWARD","Fast-forward"],["FULL_SCREEN","Full screen"],["LANGUAGE","Language"],["LIVE","Live"],["LOOP","Loop"],["MORE_SETTINGS","More settings"],["MULTIPLE_LANGUAGES","Multiple languages"],["MUTE","Mute"],["NOT_APPLICABLE","Not applicable"],["OFF","Off"],["ON","On"],
["PAUSE","Pause"],["PICTURE_IN_PICTURE","Picture-in-picture"],["PLAY","Play"],["PLAYBACK_RATE","Playback speed"],["QUALITY","Quality"],["RECENTER_VR","Recentre"],["REPLAY","Replay"],["RESOLUTION","Resolution"],["REWIND","Rewind"],["SEEK","Seek"],["SKIP_AD","Skip ad"],["SKIP_TO_LIVE","Skip ahead to live"],["STATISTICS","Statistics"],["SUBTITLE_FORCED","Forced"],["SURROUND","Surround"],["TOGGLE_STEREOSCOPIC","Toggle stereoscopic"],["UNDETERMINED_LANGUAGE","Undetermined"],["UNMUTE","Unmute"],["UNRECOGNIZED_LANGUAGE",
"Unrecognised"],["VOLUME","volume"]]));a.Xa("es",new Map([["AD_DURATION","Duraci\u00f3n del anuncio"],["AD_PROGRESS","Anuncio [AD_ON] de [NUM_ADS]"],["AD_STATISTICS","Estad\u00edsticas del anuncio"],["AD_TIME","Anuncio: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","Autom\u00e1tico"],["BACK","Atr\u00e1s"],["CAPTIONS","Subt\u00edtulos"],["CAST","Enviar..."],["CHAPTERS","Cap\u00edtulos"],["DOWNLOAD_VIDEO_FRAME","Guardar fotograma"],["ENTER_LOOP_MODE","Reproducir en bucle el v\u00eddeo actual"],
["ENTER_PICTURE_IN_PICTURE","Activar el modo imagen en imagen"],["EXIT_FULL_SCREEN","Salir del modo de pantalla completa"],["EXIT_LOOP_MODE","Dejar de reproducir en bucle el v\u00eddeo actual"],["EXIT_PICTURE_IN_PICTURE","Salir del modo imagen en imagen"],["FAST_FORWARD","Avanzar r\u00e1pidamente"],["FULL_SCREEN","Pantalla completa"],["LANGUAGE","Idioma"],["LIVE","En directo"],["LOOP","Reproducir en bucle"],["MORE_SETTINGS","M\u00e1s ajustes"],["MULTIPLE_LANGUAGES","Varios idiomas"],["MUTE","Silenciar"],
["NOT_APPLICABLE","No aplicable"],["OFF","Desactivado"],["ON","Activado"],["PAUSE","Pausar"],["PICTURE_IN_PICTURE","Imagen en imagen"],["PLAY","Reproducir"],["PLAYBACK_RATE","Velocidad de reproducci\u00f3n"],["QUALITY","Calidad"],["RECENTER_VR","Volver a centrar"],["REPLAY","Volver a reproducir"],["RESOLUTION","Resoluci\u00f3n"],["REWIND","Rebobinar"],["SEEK","Buscar"],["SKIP_AD","Saltar anuncio"],["SKIP_NEXT","Siguiente"],["SKIP_PREVIOUS","Anterior"],["SKIP_TO_LIVE","Ir al v\u00eddeo en directo"],
["STATISTICS","Estad\u00edsticas"],["SUBTITLE_FORCED","Forzado"],["SURROUND","Envolvente"],["TOGGLE_STEREOSCOPIC","Activar/Desactivar estereosc\u00f3pica"],["UNDETERMINED_LANGUAGE","Sin especificar"],["UNMUTE","Activar sonido"],["UNRECOGNIZED_LANGUAGE","No reconocida"],["VOLUME","Volumen"]]));a.Xa("es-419",new Map([["AD_DURATION","Duraci\u00f3n del anuncio"],["AD_PROGRESS","Anuncio [AD_ON] de [NUM_ADS]"],["AD_STATISTICS","Estad\u00edsticas de anuncios"],["AD_TIME","Anuncio: [AD_TIME]"],["AIRPLAY",
"AirPlay"],["AUTO_QUALITY","Autom\u00e1tico"],["BACK","Atr\u00e1s"],["CAPTIONS","Subt\u00edtulos"],["CAST","Transmitir..."],["CHAPTERS","Cap\u00edtulos"],["DOWNLOAD_VIDEO_FRAME","Guardar fotograma"],["ENTER_LOOP_MODE","Repetir indefinidamente el video actual"],["ENTER_PICTURE_IN_PICTURE","Ingresar al modo de pantalla en pantalla"],["EXIT_FULL_SCREEN","Salir de pantalla completa"],["EXIT_LOOP_MODE","Detener la repetici\u00f3n indefinida del video actual"],["EXIT_PICTURE_IN_PICTURE","Salir del modo de pantalla en pantalla"],
["FAST_FORWARD","Avanzar"],["FULL_SCREEN","Pantalla completa"],["LANGUAGE","Idioma"],["LIVE","En directo"],["LOOP","Repetir indefinidamente"],["MORE_SETTINGS","M\u00e1s opciones de configuraci\u00f3n"],["MULTIPLE_LANGUAGES","Varios idiomas"],["MUTE","Silenciar"],["NOT_APPLICABLE","No aplicable"],["OFF","Desactivado"],["ON","Activado"],["PAUSE","Detener"],["PICTURE_IN_PICTURE","Pantalla en pantalla"],["PLAY","Reproducir"],["PLAYBACK_RATE","Velocidad de reproducci\u00f3n"],["QUALITY","Calidad"],["RECENTER_VR",
"Volver a centrar"],["REPLAY","Volver a reproducir"],["RESOLUTION","Resoluci\u00f3n"],["REWIND","Retroceder"],["SEEK","Buscar"],["SKIP_AD","Omitir anuncio"],["SKIP_TO_LIVE","Adelantar hasta la transmisi\u00f3n en vivo"],["STATISTICS","Estad\u00edsticas"],["SUBTITLE_FORCED","Forzado"],["SURROUND","Sonido envolvente"],["TOGGLE_STEREOSCOPIC","Activar o desactivar el modo estereosc\u00f3pico"],["UNDETERMINED_LANGUAGE","Sin especificar"],["UNMUTE","Dejar de silenciar"],["UNRECOGNIZED_LANGUAGE","No reconocida"],
["VOLUME","Volumen"]]));a.Xa("fr",new Map([["AD_DURATION","Dur\u00e9e de l'annonce"],["AD_PROGRESS","Annonce\u00a0[AD_ON] sur\u00a0[NUM_ADS]"],["AD_STATISTICS","Statistiques sur les annonces"],["AD_TIME","Annonce\u00a0: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","Automatique"],["BACK","Retour"],["CAPTIONS","Sous-titres"],["CAST","Caster\u2026"],["CHAPTERS","Chapitres"],["DOWNLOAD_VIDEO_FRAME","T\u00e9l\u00e9charger l'image de la vid\u00e9o"],["ENTER_LOOP_MODE","Lire en boucle la vid\u00e9o en cours"],
["ENTER_PICTURE_IN_PICTURE","Utiliser le mode Picture-in-Picture"],["EXIT_FULL_SCREEN","Quitter le mode plein \u00e9cran"],["EXIT_LOOP_MODE","Arr\u00eater la lecture en boucle de la vid\u00e9o en cours"],["EXIT_PICTURE_IN_PICTURE","Quitter le mode\u00a0PIP (Picture-in-picture)"],["FAST_FORWARD","Avance rapide"],["FULL_SCREEN","Plein \u00e9cran"],["LANGUAGE","Langue"],["LIVE","En direct"],["LOOP","R\u00e9p\u00e9ter"],["MORE_SETTINGS","Plus de param\u00e8tres"],["MULTIPLE_LANGUAGES","Plusieurs langues"],
["MUTE","Couper le son"],["NOT_APPLICABLE","Non applicable"],["OFF","D\u00e9sactiv\u00e9e"],["ON","Activ\u00e9e"],["PAUSE","Pause"],["PICTURE_IN_PICTURE","Picture-in-Picture"],["PLAY","Visionner"],["PLAYBACK_RATE","Vitesse de lecture"],["QUALITY","Qualit\u00e9"],["RECENTER_VR","Recentrer"],["REPLAY","Revoir"],["RESOLUTION","R\u00e9solution"],["REWIND","Retour arri\u00e8re"],["SEEK","Chercher"],["SKIP_AD","Passer l'annonce"],["SKIP_NEXT","Suivante"],["SKIP_PREVIOUS","Pr\u00e9c\u00e9dente"],["SKIP_TO_LIVE",
"Acc\u00e9der \u00e0 la partie la plus r\u00e9cente du direct"],["STATISTICS","Statistiques"],["SUBTITLE_FORCED","Forc\u00e9"],["SURROUND","Surround"],["TOGGLE_STEREOSCOPIC","Activer/D\u00e9sactiver le mode st\u00e9r\u00e9oscopique"],["UNDETERMINED_LANGUAGE","Langue ind\u00e9termin\u00e9e"],["UNMUTE","R\u00e9activer le son"],["UNRECOGNIZED_LANGUAGE","Non reconnu"],["VOLUME","Volume"]]));a.Xa("it",new Map([["AD_DURATION","Durata dell'annuncio"],["AD_PROGRESS","Annuncio [AD_ON] di [NUM_ADS]"],["AD_STATISTICS",
"Statistiche sugli annunci"],["AD_TIME","Annuncio: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","Automatica"],["BACK","Indietro"],["CAPTIONS","Sottotitoli"],["CAST","Trasmetti..."],["CHAPTERS","Capitoli"],["DOWNLOAD_VIDEO_FRAME","Salva fotogramma"],["ENTER_LOOP_MODE","Riproduci in loop il video corrente"],["ENTER_PICTURE_IN_PICTURE","Attiva Picture in picture"],["EXIT_FULL_SCREEN","Esci da schermo intero"],["EXIT_LOOP_MODE","Interrompi riproduzione in loop del video corrente"],["EXIT_PICTURE_IN_PICTURE",
"Esci da Picture in picture"],["FAST_FORWARD","Avanti veloce"],["FULL_SCREEN","Schermo intero"],["LANGUAGE","Lingua"],["LIVE","Dal vivo"],["LOOP","Riproduci in loop"],["MORE_SETTINGS","Altre impostazioni"],["MULTIPLE_LANGUAGES","Pi\u00f9 lingue"],["MUTE","Disattiva audio"],["NOT_APPLICABLE","Non applicabile"],["OFF","Disattivo"],["ON","Attivo"],["PAUSE","Metti in pausa"],["PICTURE_IN_PICTURE","Picture in picture"],["PLAY","Riproduci"],["PLAYBACK_RATE","Velocit\u00e0 di riproduzione"],["QUALITY","Qualit\u00e0"],
["RECENTER_VR","Ricentra"],["REPLAY","Riproduci di nuovo"],["RESOLUTION","Risoluzione"],["REWIND","Riavvolgi"],["SEEK","Cerca"],["SKIP_AD","Salta annuncio"],["SKIP_TO_LIVE","Passa alla trasmissione dal vivo"],["STATISTICS","Statistiche"],["SUBTITLE_FORCED","Forzata"],["SURROUND","Surround"],["TOGGLE_STEREOSCOPIC","Pulsante di attivazione/disattivazione stereoscopico"],["UNDETERMINED_LANGUAGE","Indeterminata"],["UNMUTE","Riattiva audio"],["UNRECOGNIZED_LANGUAGE","Non riconosciuto"],["VOLUME","Volume"]]));
a.Xa("ja",new Map([["AD_DURATION","\u5e83\u544a\u518d\u751f\u6642\u9593"],["AD_PROGRESS","[AD_ON] \u756a\u76ee\u306e\u5e83\u544a\uff08\u5168 [NUM_ADS] \u500b\uff09"],["AD_STATISTICS","\u5e83\u544a\u306e\u7d71\u8a08\u60c5\u5831"],["AD_TIME","\u5e83\u544a: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","\u81ea\u52d5"],["BACK","\u623b\u308b"],["CAPTIONS","\u5b57\u5e55"],["CAST","\u30ad\u30e3\u30b9\u30c8..."],["CHAPTERS","\u7ae0"],["DOWNLOAD_VIDEO_FRAME","\u52d5\u753b\u30d5\u30ec\u30fc\u30e0\u3092\u4fdd\u5b58"],
["ENTER_LOOP_MODE","\u73fe\u5728\u306e\u52d5\u753b\u3092\u30eb\u30fc\u30d7\u518d\u751f"],["ENTER_PICTURE_IN_PICTURE","\u30d4\u30af\u30c1\u30e3\u30fc \u30a4\u30f3 \u30d4\u30af\u30c1\u30e3\u30fc\u3092\u958b\u59cb"],["EXIT_FULL_SCREEN","\u5168\u753b\u9762\u8868\u793a\u3092\u7d42\u4e86"],["EXIT_LOOP_MODE","\u73fe\u5728\u306e\u52d5\u753b\u306e\u30eb\u30fc\u30d7\u518d\u751f\u3092\u505c\u6b62"],["EXIT_PICTURE_IN_PICTURE","\u30d4\u30af\u30c1\u30e3\u30fc \u30a4\u30f3 \u30d4\u30af\u30c1\u30e3\u30fc\u3092\u7d42\u4e86"],
["FAST_FORWARD","\u65e9\u9001\u308a"],["FULL_SCREEN","\u5168\u753b\u9762\u8868\u793a"],["LANGUAGE","\u8a00\u8a9e"],["LIVE","\u30e9\u30a4\u30d6"],["LOOP","\u30eb\u30fc\u30d7"],["MORE_SETTINGS","\u8a73\u7d30\u8a2d\u5b9a"],["MULTIPLE_LANGUAGES","\u591a\u8a00\u8a9e"],["MUTE","\u30df\u30e5\u30fc\u30c8"],["NOT_APPLICABLE","\u8a72\u5f53\u306a\u3057"],["OFF","\u30aa\u30d5"],["ON","\u30aa\u30f3"],["PAUSE","\u4e00\u6642\u505c\u6b62"],["PICTURE_IN_PICTURE","\u30d4\u30af\u30c1\u30e3\u30fc \u30a4\u30f3 \u30d4\u30af\u30c1\u30e3\u30fc"],
["PLAY","\u518d\u751f"],["PLAYBACK_RATE","\u518d\u751f\u901f\u5ea6"],["QUALITY","\u54c1\u8cea"],["RECENTER_VR","\u4e2d\u5fc3\u3092\u518d\u8a2d\u5b9a"],["REPLAY","\u3082\u3046\u4e00\u5ea6\u518d\u751f"],["RESOLUTION","\u89e3\u50cf\u5ea6"],["REWIND","\u5dfb\u304d\u623b\u3057"],["SEEK","\u30b7\u30fc\u30af\u518d\u751f"],["SKIP_AD","\u5e83\u544a\u3092\u30b9\u30ad\u30c3\u30d7"],["SKIP_TO_LIVE","\u30e9\u30a4\u30d6\u914d\u4fe1\u307e\u3067\u30b9\u30ad\u30c3\u30d7"],["STATISTICS","\u7d71\u8a08\u60c5\u5831"],
["SUBTITLE_FORCED","\u5f37\u5236"],["SURROUND","\u30b5\u30e9\u30a6\u30f3\u30c9"],["TOGGLE_STEREOSCOPIC","\u7acb\u4f53\u753b\u50cf\u3092\u5207\u308a\u66ff\u3048\u308b"],["UNDETERMINED_LANGUAGE","\u4e0d\u660e"],["UNMUTE","\u30df\u30e5\u30fc\u30c8\u3092\u89e3\u9664"],["UNRECOGNIZED_LANGUAGE","\u4e0d\u660e"],["VOLUME","\u97f3\u91cf"]]));a.Xa("ko",new Map([["AD_DURATION","\uad11\uace0 \uae30\uac04"],["AD_PROGRESS","\uad11\uace0 [AD_ON]/[NUM_ADS]"],["AD_STATISTICS","\uad11\uace0 \ud1b5\uacc4"],["AD_TIME",
"\uad11\uace0: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","\uc790\ub3d9"],["BACK","\ub4a4\ub85c"],["CAPTIONS","\uc790\ub9c9"],["CAST","\uc804\uc1a1..."],["CHAPTERS","\uc7a5"],["DOWNLOAD_VIDEO_FRAME","\ub3d9\uc601\uc0c1 \ud504\ub808\uc784 \uc800\uc7a5"],["ENTER_LOOP_MODE","\ud604\uc7ac \ub3d9\uc601\uc0c1 \ubc18\ubcf5 \uc7ac\uc0dd"],["ENTER_PICTURE_IN_PICTURE","PIP \ubaa8\ub4dc \uc2dc\uc791"],["EXIT_FULL_SCREEN","\uc804\uccb4\ud654\uba74 \ub2eb\uae30"],["EXIT_LOOP_MODE","\ud604\uc7ac \ub3d9\uc601\uc0c1 \ubc18\ubcf5 \uc7ac\uc0dd \uc911\uc9c0"],
["EXIT_PICTURE_IN_PICTURE","PIP \ubaa8\ub4dc \uc885\ub8cc"],["FAST_FORWARD","\ube68\ub9ac \uac10\uae30"],["FULL_SCREEN","\uc804\uccb4\ud654\uba74"],["LANGUAGE","\uc5b8\uc5b4"],["LIVE","\uc2e4\uc2dc\uac04"],["LOOP","\ubc18\ubcf5 \uc7ac\uc0dd"],["MORE_SETTINGS","\uc124\uc815 \ub354\ubcf4\uae30"],["MULTIPLE_LANGUAGES","\uc5ec\ub7ec \uc5b8\uc5b4"],["MUTE","\uc74c\uc18c\uac70"],["NOT_APPLICABLE","\ud574\ub2f9 \uc0ac\ud56d \uc5c6\uc74c"],["OFF","\uc0ac\uc6a9 \uc548\ud568"],["ON","\uc0ac\uc6a9"],["PAUSE",
"\uc77c\uc2dc\uc911\uc9c0"],["PICTURE_IN_PICTURE","PIP \ubaa8\ub4dc"],["PLAY","\uc7ac\uc0dd"],["PLAYBACK_RATE","\uc7ac\uc0dd \uc18d\ub3c4"],["QUALITY","\ud488\uc9c8"],["RECENTER_VR","\uc911\uc2ec \uc7ac\uc124\uc815"],["REPLAY","\ub2e4\uc2dc\ubcf4\uae30"],["RESOLUTION","\ud574\uc0c1\ub3c4"],["REWIND","\ub418\uac10\uae30"],["SEEK","\ucc3e\uae30"],["SKIP_AD","\uad11\uace0 \uac74\ub108\ub6f0\uae30"],["SKIP_TO_LIVE","\ub77c\uc774\ube0c \ub3d9\uc601\uc0c1\uc73c\ub85c \uac74\ub108\ub6f0\uae30"],["STATISTICS",
"\ud1b5\uacc4"],["SUBTITLE_FORCED","\uac15\uc81c"],["SURROUND","\uc11c\ub77c\uc6b4\ub4dc"],["TOGGLE_STEREOSCOPIC","\uc785\uccb4 \ubcf4\uae30 \uc804\ud658"],["UNDETERMINED_LANGUAGE","\ubbf8\uc815"],["UNMUTE","\uc74c\uc18c\uac70 \ud574\uc81c"],["UNRECOGNIZED_LANGUAGE","\uc54c \uc218 \uc5c6\uc74c"],["VOLUME","\ubcfc\ub968"]]));a.Xa("nl",new Map([["AD_DURATION","Advertentieduur"],["AD_PROGRESS","Advertentie [AD_ON] van [NUM_ADS]"],["AD_STATISTICS","Advertentiestatistieken"],["AD_TIME","Advertentie: [AD_TIME]"],
["AIRPLAY","AirPlay"],["AUTO_QUALITY","Automatisch"],["BACK","Terug"],["CAPTIONS","Ondertiteling"],["CAST","Casten..."],["CHAPTERS","Hoofdstukken"],["DOWNLOAD_VIDEO_FRAME","Videoframe opslaan"],["ENTER_LOOP_MODE","De huidige video lussen"],["ENTER_PICTURE_IN_PICTURE","Scherm-in-scherm openen"],["EXIT_FULL_SCREEN","Volledig scherm sluiten"],["EXIT_LOOP_MODE","De huidige video niet meer lussen"],["EXIT_PICTURE_IN_PICTURE","Scherm-in-scherm afsluiten"],["FAST_FORWARD","Vooruitspoelen"],["FULL_SCREEN",
"Volledig scherm"],["LANGUAGE","Taal"],["LIVE","Live"],["LOOP","Lussen"],["MORE_SETTINGS","Meer instellingen"],["MULTIPLE_LANGUAGES","Meerdere talen"],["MUTE","Geluid uitzetten"],["NOT_APPLICABLE","Niet van toepassing"],["OFF","Uit"],["ON","Aan"],["PAUSE","Onderbreken"],["PICTURE_IN_PICTURE","Scherm-in-scherm"],["PLAY","Afspelen"],["PLAYBACK_RATE","Afspeelsnelheid"],["QUALITY","Kwaliteit"],["RECENTER_VR","Opnieuw centreren"],["REPLAY","Opnieuw afspelen"],["RESOLUTION","Resolutie"],["REWIND","Terugspoelen"],
["SEEK","Zoeken"],["SKIP_AD","Advertentie overslaan"],["SKIP_TO_LIVE","Doorgaan naar live"],["STATISTICS","Statistieken"],["SUBTITLE_FORCED","Afgedwongen"],["SURROUND","Surround"],["TOGGLE_STEREOSCOPIC","Stereoscopisch aan-/uitzetten"],["UNDETERMINED_LANGUAGE","Onbepaald"],["UNMUTE","Geluid aanzetten"],["UNRECOGNIZED_LANGUAGE","Onbekend"],["VOLUME","Volume"]]));a.Xa("pl",new Map([["AD_DURATION","Czas trwania reklamy"],["AD_PROGRESS","Reklama\u00a0[AD_ON] z\u00a0[NUM_ADS]"],["AD_STATISTICS","Statystyki reklam"],
["AD_TIME","Reklama: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","Automatycznie"],["BACK","Wstecz"],["CAPTIONS","Napisy"],["CAST","Przesy\u0142aj..."],["CHAPTERS","Rozdzia\u0142y"],["DOWNLOAD_VIDEO_FRAME","Zapisz klatk\u0119 filmu"],["ENTER_LOOP_MODE","Odtwarzaj bie\u017c\u0105cy film w\u00a0p\u0119tli"],["ENTER_PICTURE_IN_PICTURE","W\u0142\u0105cz tryb obrazu w\u00a0obrazie"],["EXIT_FULL_SCREEN","Zamknij pe\u0142ny ekran"],["EXIT_LOOP_MODE","Wy\u0142\u0105cz odtwarzanie bie\u017c\u0105cego filmu w\u00a0p\u0119tli"],
["EXIT_PICTURE_IN_PICTURE","Wy\u0142\u0105cz tryb obrazu w\u00a0obrazie"],["FAST_FORWARD","Przewi\u0144 do przodu"],["FULL_SCREEN","Pe\u0142ny ekran"],["LANGUAGE","J\u0119zyk"],["LIVE","Na \u017cywo"],["LOOP","Odtwarzaj w\u00a0p\u0119tli"],["MORE_SETTINGS","Wi\u0119cej ustawie\u0144"],["MULTIPLE_LANGUAGES","Wiele j\u0119zyk\u00f3w"],["MUTE","Wycisz"],["NOT_APPLICABLE","Nie dotyczy"],["OFF","Wy\u0142\u0105czone"],["ON","W\u0142\u0105czone"],["PAUSE","Wstrzymaj"],["PICTURE_IN_PICTURE","Obraz w\u00a0obrazie"],
["PLAY","Odtw\u00f3rz"],["PLAYBACK_RATE","Szybko\u015b\u0107 odtwarzania"],["QUALITY","Jako\u015b\u0107"],["RECENTER_VR","Wy\u015brodkuj"],["REPLAY","Odtw\u00f3rz ponownie"],["RESOLUTION","Rozdzielczo\u015b\u0107"],["REWIND","Przewi\u0144 do ty\u0142u"],["SEEK","Szukaj"],["SKIP_AD","Pomi\u0144 reklam\u0119"],["SKIP_NEXT","Dalej"],["SKIP_PREVIOUS","Poprzedni"],["SKIP_TO_LIVE","Przejd\u017a do transmisji na \u017cywo"],["STATISTICS","Statystyki"],["SUBTITLE_FORCED","Wymuszone"],["SURROUND","Przestrzenny"],
["TOGGLE_STEREOSCOPIC","Prze\u0142\u0105cz tryb stereoskopowy"],["UNDETERMINED_LANGUAGE","Nie okre\u015blono"],["UNMUTE","Wy\u0142\u0105cz wyciszenie"],["UNRECOGNIZED_LANGUAGE","Nierozpoznany"],["VOLUME","G\u0142o\u015bno\u015b\u0107"]]));a.Xa("pt-BR",new Map([["AD_DURATION","Dura\u00e7\u00e3o do an\u00fancio"],["AD_PROGRESS","An\u00fancio [AD_ON] de [NUM_ADS]"],["AD_STATISTICS","Estat\u00edsticas de an\u00fancios"],["AD_TIME","An\u00fancio: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","Autom\u00e1tica"],
["BACK","Voltar"],["CAPTIONS","Legendas"],["CAST","Transmitir..."],["CHAPTERS","Cap\u00edtulos"],["DOWNLOAD_VIDEO_FRAME","Salvar frame do v\u00eddeo"],["ENTER_LOOP_MODE","Repetir o v\u00eddeo atual"],["ENTER_PICTURE_IN_PICTURE","Entrar no modo picture-in-picture"],["EXIT_FULL_SCREEN","Sair do modo tela cheia"],["EXIT_LOOP_MODE","Parar repeti\u00e7\u00e3o do v\u00eddeo atual"],["EXIT_PICTURE_IN_PICTURE","Sair de picture-in-picture"],["FAST_FORWARD","Avan\u00e7ar"],["FULL_SCREEN","Tela cheia"],["LANGUAGE",
"Idioma"],["LIVE","Ao vivo"],["LOOP","Repetir"],["MORE_SETTINGS","Mais defini\u00e7\u00f5es"],["MULTIPLE_LANGUAGES","V\u00e1rios idiomas"],["MUTE","Desativar som"],["NOT_APPLICABLE","N\u00e3o relevante"],["OFF","Desativado"],["ON","Ativado"],["PAUSE","Pausar"],["PICTURE_IN_PICTURE","Picture-in-picture"],["PLAY","Reproduzir"],["PLAYBACK_RATE","Velocidade da reprodu\u00e7\u00e3o"],["QUALITY","Qualidade"],["RECENTER_VR","Centralizar"],["REPLAY","Repetir"],["RESOLUTION","Resolu\u00e7\u00e3o"],["REWIND",
"Voltar"],["SEEK","Procurar"],["SKIP_AD","Pular an\u00fancio"],["SKIP_TO_LIVE","Pular para transmiss\u00e3o ao vivo"],["STATISTICS","Estat\u00edsticas"],["SUBTITLE_FORCED","Exibi\u00e7\u00e3o for\u00e7ada"],["SURROUND","Surround"],["TOGGLE_STEREOSCOPIC","Alternar imagem estereosc\u00f3pica"],["UNDETERMINED_LANGUAGE","Indeterminado"],["UNMUTE","Ativar som"],["UNRECOGNIZED_LANGUAGE","N\u00e3o reconhecido"],["VOLUME","Volume"]]));a.Xa("ru",new Map([["AD_DURATION","\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0440\u0435\u043a\u043b\u0430\u043c\u044b"],
["AD_PROGRESS","\u0420\u0435\u043a\u043b\u0430\u043c\u0430 [AD_ON] \u0438\u0437 [NUM_ADS]"],["AD_STATISTICS","\u0421\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0439"],["AD_TIME","\u0420\u0435\u043a\u043b\u0430\u043c\u0430: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","\u0410\u0432\u0442\u043e"],["BACK","\u041d\u0430\u0437\u0430\u0434"],["CAPTIONS","\u0421\u0443\u0431\u0442\u0438\u0442\u0440\u044b"],["CAST","\u0422\u0440\u0430\u043d\u0441\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c..."],
["CHAPTERS","\u042d\u043f\u0438\u0437\u043e\u0434\u044b"],["DOWNLOAD_VIDEO_FRAME","\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043a\u0430\u0434\u0440 \u0432\u0438\u0434\u0435\u043e"],["ENTER_LOOP_MODE","\u0417\u0430\u0446\u0438\u043a\u043b\u0438\u0442\u044c \u0442\u0435\u043a\u0443\u0449\u0435\u0435 \u0432\u0438\u0434\u0435\u043e"],["ENTER_PICTURE_IN_PICTURE",'\u041f\u0435\u0440\u0435\u0439\u0442\u0438 \u0432 \u0440\u0435\u0436\u0438\u043c "\u041a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u0432 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435"'],
["EXIT_FULL_SCREEN","\u041e\u0431\u044b\u0447\u043d\u044b\u0439 \u0440\u0435\u0436\u0438\u043c"],["EXIT_LOOP_MODE","\u041e\u0442\u043c\u0435\u043d\u0438\u0442\u044c \u0437\u0430\u0446\u0438\u043a\u043b\u0438\u0432\u0430\u043d\u0438\u0435 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u0432\u0438\u0434\u0435\u043e"],["EXIT_PICTURE_IN_PICTURE",'\u0412\u044b\u0439\u0442\u0438 \u0438\u0437 \u0440\u0435\u0436\u0438\u043c\u0430 "\u041a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u0432 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435"'],
["FAST_FORWARD","\u041f\u0435\u0440\u0435\u043c\u043e\u0442\u043a\u0430 \u0432\u043f\u0435\u0440\u0435\u0434"],["FULL_SCREEN","\u041f\u043e\u043b\u043d\u043e\u044d\u043a\u0440\u0430\u043d\u043d\u044b\u0439 \u0440\u0435\u0436\u0438\u043c"],["LANGUAGE","\u042f\u0437\u044b\u043a"],["LIVE","\u041f\u0440\u044f\u043c\u043e\u0439 \u044d\u0444\u0438\u0440"],["LOOP","\u0417\u0430\u0446\u0438\u043a\u043b\u0438\u0442\u044c"],["MORE_SETTINGS","\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438"],
["MULTIPLE_LANGUAGES","\u041d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u044f\u0437\u044b\u043a\u043e\u0432"],["MUTE","\u041e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0437\u0432\u0443\u043a"],["NOT_APPLICABLE","\u041d\u0435\u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c\u043e"],["OFF","\u0412\u044b\u043a\u043b."],["ON","\u0412\u043a\u043b."],["PAUSE","\u041f\u0430\u0443\u0437\u0430"],["PICTURE_IN_PICTURE","\u041a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u0432 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435"],
["PLAY","\u0412\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u0438"],["PLAYBACK_RATE","\u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f"],["QUALITY","\u041a\u0430\u0447\u0435\u0441\u0442\u0432\u043e"],["RECENTER_VR","\u0426\u0435\u043d\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0437\u0430\u043d\u043e\u0432\u043e"],["REPLAY","\u041f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u044c"],
["RESOLUTION","\u0420\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435"],["REWIND","\u041f\u0435\u0440\u0435\u043c\u043e\u0442\u0430\u0442\u044c \u043d\u0430\u0437\u0430\u0434"],["SEEK","\u041f\u0435\u0440\u0435\u043c\u043e\u0442\u043a\u0430"],["SKIP_AD","\u041f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c"],["SKIP_TO_LIVE","\u041f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0438 \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u043f\u0440\u044f\u043c\u043e\u0439 \u0442\u0440\u0430\u043d\u0441\u043b\u044f\u0446\u0438\u0438"],
["STATISTICS","\u0421\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430"],["SUBTITLE_FORCED","\u0421\u0443\u0431\u0442\u0438\u0442\u0440\u044b \u043f\u0440\u0438\u043d\u0443\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e"],["SURROUND","\u041e\u0431\u044a\u0435\u043c\u043d\u044b\u0439 \u0437\u0432\u0443\u043a"],["TOGGLE_STEREOSCOPIC","\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0438\u043b\u0438 \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0441\u0442\u0435\u0440\u0435\u043e\u0441\u043a\u043e\u043f\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0440\u0435\u0436\u0438\u043c"],
["UNDETERMINED_LANGUAGE","\u041d\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u043e"],["UNMUTE","\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0437\u0432\u0443\u043a"],["UNRECOGNIZED_LANGUAGE","\u041d\u0435 \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u043d\u043e"],["VOLUME","\u0413\u0440\u043e\u043c\u043a\u043e\u0441\u0442\u044c"]]));a.Xa("th",new Map([["AD_DURATION","\u0e23\u0e30\u0e22\u0e30\u0e40\u0e27\u0e25\u0e32\u0e42\u0e06\u0e29\u0e13\u0e32"],["AD_PROGRESS","\u0e42\u0e06\u0e29\u0e13\u0e32 [AD_ON] \u0e08\u0e32\u0e01 [NUM_ADS] \u0e23\u0e32\u0e22\u0e01\u0e32\u0e23"],
["AD_STATISTICS","\u0e2a\u0e16\u0e34\u0e15\u0e34\u0e42\u0e06\u0e29\u0e13\u0e32"],["AD_TIME","\u0e42\u0e06\u0e29\u0e13\u0e32: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","\u0e2d\u0e31\u0e15\u0e42\u0e19\u0e21\u0e31\u0e15\u0e34"],["BACK","\u0e01\u0e25\u0e31\u0e1a"],["CAPTIONS","\u0e04\u0e33\u0e1a\u0e23\u0e23\u0e22\u0e32\u0e22\u0e41\u0e17\u0e19\u0e40\u0e2a\u0e35\u0e22\u0e07"],["CAST","\u0e41\u0e04\u0e2a\u0e15\u0e4c..."],["CHAPTERS","\u0e1a\u0e17"],["DOWNLOAD_VIDEO_FRAME","\u0e1a\u0e31\u0e19\u0e17\u0e36\u0e01\u0e40\u0e1f\u0e23\u0e21\u0e27\u0e34\u0e14\u0e35\u0e42\u0e2d"],
["ENTER_LOOP_MODE","\u0e27\u0e19\u0e0b\u0e49\u0e33\u0e27\u0e34\u0e14\u0e35\u0e42\u0e2d\u0e1b\u0e31\u0e08\u0e08\u0e38\u0e1a\u0e31\u0e19"],["ENTER_PICTURE_IN_PICTURE","\u0e40\u0e02\u0e49\u0e32\u0e2a\u0e39\u0e48\u0e01\u0e32\u0e23\u0e41\u0e2a\u0e14\u0e07\u0e20\u0e32\u0e1e\u0e0b\u0e49\u0e2d\u0e19\u0e20\u0e32\u0e1e"],["EXIT_FULL_SCREEN","\u0e2d\u0e2d\u0e01\u0e08\u0e32\u0e01\u0e01\u0e32\u0e23\u0e41\u0e2a\u0e14\u0e07\u0e41\u0e1a\u0e1a\u0e40\u0e15\u0e47\u0e21\u0e2b\u0e19\u0e49\u0e32\u0e08\u0e2d"],["EXIT_LOOP_MODE",
"\u0e2b\u0e22\u0e38\u0e14\u0e27\u0e19\u0e0b\u0e49\u0e33\u0e27\u0e34\u0e14\u0e35\u0e42\u0e2d\u0e1b\u0e31\u0e08\u0e08\u0e38\u0e1a\u0e31\u0e19"],["EXIT_PICTURE_IN_PICTURE","\u0e2d\u0e2d\u0e01\u0e08\u0e32\u0e01\u0e01\u0e32\u0e23\u0e41\u0e2a\u0e14\u0e07\u0e20\u0e32\u0e1e\u0e0b\u0e49\u0e2d\u0e19\u0e20\u0e32\u0e1e"],["FAST_FORWARD","\u0e01\u0e23\u0e2d\u0e44\u0e1b\u0e02\u0e49\u0e32\u0e07\u0e2b\u0e19\u0e49\u0e32"],["FULL_SCREEN","\u0e40\u0e15\u0e47\u0e21\u0e2b\u0e19\u0e49\u0e32\u0e08\u0e2d"],["LANGUAGE","\u0e20\u0e32\u0e29\u0e32"],
["LIVE","\u0e2a\u0e14"],["LOOP","\u0e25\u0e39\u0e1b"],["MORE_SETTINGS","\u0e01\u0e32\u0e23\u0e15\u0e31\u0e49\u0e07\u0e04\u0e48\u0e32\u0e40\u0e1e\u0e34\u0e48\u0e21\u0e40\u0e15\u0e34\u0e21"],["MULTIPLE_LANGUAGES","\u0e2b\u0e25\u0e32\u0e22\u0e20\u0e32\u0e29\u0e32"],["MUTE","\u0e1b\u0e34\u0e14\u0e40\u0e2a\u0e35\u0e22\u0e07"],["NOT_APPLICABLE","\u0e44\u0e21\u0e48\u0e40\u0e01\u0e35\u0e48\u0e22\u0e27\u0e02\u0e49\u0e2d\u0e07"],["OFF","\u0e1b\u0e34\u0e14"],["ON","\u0e40\u0e1b\u0e34\u0e14"],["PAUSE","\u0e2b\u0e22\u0e38\u0e14\u0e0a\u0e31\u0e48\u0e27\u0e04\u0e23\u0e32\u0e27"],
["PICTURE_IN_PICTURE","\u0e01\u0e32\u0e23\u0e41\u0e2a\u0e14\u0e07\u0e20\u0e32\u0e1e\u0e0b\u0e49\u0e2d\u0e19\u0e20\u0e32\u0e1e"],["PLAY","\u0e40\u0e25\u0e48\u0e19"],["PLAYBACK_RATE","\u0e04\u0e27\u0e32\u0e21\u0e40\u0e23\u0e47\u0e27\u0e43\u0e19\u0e01\u0e32\u0e23\u0e40\u0e25\u0e48\u0e19"],["QUALITY","\u0e04\u0e38\u0e13\u0e20\u0e32\u0e1e"],["RECENTER_VR","\u0e08\u0e31\u0e14\u0e01\u0e36\u0e48\u0e07\u0e01\u0e25\u0e32\u0e07\u0e43\u0e2b\u0e21\u0e48"],["REPLAY","\u0e40\u0e25\u0e48\u0e19\u0e0b\u0e49\u0e33"],
["RESOLUTION","\u0e04\u0e27\u0e32\u0e21\u0e25\u0e30\u0e40\u0e2d\u0e35\u0e22\u0e14"],["REWIND","\u0e01\u0e23\u0e2d\u0e01\u0e25\u0e31\u0e1a"],["SEEK","\u0e04\u0e49\u0e19\u0e2b\u0e32"],["SKIP_AD","\u0e02\u0e49\u0e32\u0e21\u0e42\u0e06\u0e29\u0e13\u0e32"],["SKIP_TO_LIVE","\u0e02\u0e49\u0e32\u0e21\u0e44\u0e1b\u0e17\u0e35\u0e48\u0e01\u0e32\u0e23\u0e16\u0e48\u0e32\u0e22\u0e17\u0e2d\u0e14\u0e2a\u0e14"],["STATISTICS","\u0e2a\u0e16\u0e34\u0e15\u0e34"],["SUBTITLE_FORCED","\u0e1a\u0e31\u0e07\u0e04\u0e31\u0e1a"],
["SURROUND","\u0e40\u0e0b\u0e2d\u0e23\u0e4c\u0e23\u0e32\u0e27\u0e14\u0e4c"],["TOGGLE_STEREOSCOPIC","\u0e40\u0e1b\u0e34\u0e14/\u0e1b\u0e34\u0e14\u0e1f\u0e35\u0e40\u0e08\u0e2d\u0e23\u0e4c\u0e2a\u0e32\u0e21\u0e21\u0e34\u0e15\u0e34"],["UNDETERMINED_LANGUAGE","\u0e44\u0e21\u0e48\u0e01\u0e33\u0e2b\u0e19\u0e14"],["UNMUTE","\u0e40\u0e1b\u0e34\u0e14\u0e40\u0e2a\u0e35\u0e22\u0e07"],["UNRECOGNIZED_LANGUAGE","\u0e17\u0e35\u0e48\u0e44\u0e21\u0e48\u0e23\u0e39\u0e49\u0e08\u0e31\u0e01"],["VOLUME","\u0e23\u0e30\u0e14\u0e31\u0e1a\u0e40\u0e2a\u0e35\u0e22\u0e07"]]));
a.Xa("tr",new Map([["AD_DURATION","Reklam s\u00fcresi"],["AD_PROGRESS","[AD_ON]/[NUM_ADS] reklam"],["AD_STATISTICS","Reklam istatistikleri"],["AD_TIME","Reklam: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","Otomatik"],["BACK","Geri"],["CAPTIONS","Altyaz\u0131lar"],["CAST","Yay\u0131nla..."],["CHAPTERS","B\u00f6l\u00fcmler"],["DOWNLOAD_VIDEO_FRAME","Video karesini kaydet"],["ENTER_LOOP_MODE","Mevcut videoyu d\u00f6ng\u00fcye al"],["ENTER_PICTURE_IN_PICTURE","Pencere i\u00e7inde Pencere moduna gir"],
["EXIT_FULL_SCREEN","Tam ekrandan \u00e7\u0131k"],["EXIT_LOOP_MODE","Mevcut videonun d\u00f6ng\u00fcs\u00fcn\u00fc durdur"],["EXIT_PICTURE_IN_PICTURE","Pencere \u0130\u00e7inde Pencereden \u00c7\u0131k"],["FAST_FORWARD","\u0130leri sar"],["FULL_SCREEN","Tam ekran"],["LANGUAGE","Dil"],["LIVE","Canl\u0131"],["LOOP","D\u00f6ng\u00fc"],["MORE_SETTINGS","Daha fazla ayar"],["MULTIPLE_LANGUAGES","Birden \u00e7ok dil"],["MUTE","Sesi kapat"],["NOT_APPLICABLE","Ge\u00e7erli de\u011fil"],["OFF","Kapal\u0131"],
["ON","A\u00e7\u0131k"],["PAUSE","Duraklat"],["PICTURE_IN_PICTURE","Pencere \u0130\u00e7inde Pencere"],["PLAY","Oynat"],["PLAYBACK_RATE","\u00c7alma h\u0131z\u0131"],["QUALITY","Kalite"],["RECENTER_VR","Ortala"],["REPLAY","Tekrar Oynat"],["RESOLUTION","\u00c7\u00f6z\u00fcn\u00fcrl\u00fck"],["REWIND","Geri sar"],["SEEK","Ara"],["SKIP_AD","Reklam\u0131 Atla"],["SKIP_TO_LIVE","Canl\u0131 yay\u0131na atla"],["STATISTICS","\u0130statistikler"],["SUBTITLE_FORCED","Zorunlu"],["SURROUND","Surround"],["TOGGLE_STEREOSCOPIC",
"Stereoskopik modu a\u00e7/kapat"],["UNDETERMINED_LANGUAGE","Belirsiz"],["UNMUTE","Sesi a\u00e7"],["UNRECOGNIZED_LANGUAGE","Tan\u0131nmayan"],["VOLUME","Ses"]]));a.Xa("zh",new Map([["AD_DURATION","\u5e7f\u544a\u6301\u7eed\u65f6\u95f4"],["AD_PROGRESS","\u5e7f\u544a [AD_ON]/[NUM_ADS]"],["AD_STATISTICS","\u5e7f\u544a\u7edf\u8ba1\u4fe1\u606f"],["AD_TIME","\u5e7f\u544a\uff1a[AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","\u81ea\u52a8"],["BACK","\u8fd4\u56de"],["CAPTIONS","\u5b57\u5e55"],["CAST","\u6295\u653e\u2026"],
["CHAPTERS","\u7ae0\u8282"],["DOWNLOAD_VIDEO_FRAME","\u4fdd\u5b58\u89c6\u9891\u5e27"],["ENTER_LOOP_MODE","\u5faa\u73af\u64ad\u653e\u5f53\u524d\u89c6\u9891"],["ENTER_PICTURE_IN_PICTURE","\u8fdb\u5165\u201c\u753b\u4e2d\u753b\u201d\u6a21\u5f0f"],["EXIT_FULL_SCREEN","\u9000\u51fa\u5168\u5c4f\u6a21\u5f0f"],["EXIT_LOOP_MODE","\u505c\u6b62\u5faa\u73af\u64ad\u653e\u5f53\u524d\u89c6\u9891"],["EXIT_PICTURE_IN_PICTURE","\u9000\u51fa\u201c\u753b\u4e2d\u753b\u201d\u6a21\u5f0f"],["FAST_FORWARD","\u5feb\u8fdb"],
["FULL_SCREEN","\u5168\u5c4f"],["LANGUAGE","\u8bed\u8a00"],["LIVE","\u76f4\u64ad"],["LOOP","\u5faa\u73af\u64ad\u653e"],["MORE_SETTINGS","\u66f4\u591a\u8bbe\u7f6e"],["MULTIPLE_LANGUAGES","\u591a\u79cd\u8bed\u8a00"],["MUTE","\u9759\u97f3"],["NOT_APPLICABLE","\u4e0d\u9002\u7528"],["OFF","\u5173\u95ed"],["ON","\u5f00\u542f"],["PAUSE","\u6682\u505c"],["PICTURE_IN_PICTURE","\u753b\u4e2d\u753b"],["PLAY","\u64ad\u653e"],["PLAYBACK_RATE","\u64ad\u653e\u901f\u5ea6"],["QUALITY","\u753b\u8d28"],["RECENTER_VR",
"\u91cd\u65b0\u7f6e\u4e2d"],["REPLAY","\u91cd\u653e"],["RESOLUTION","\u5206\u8fa8\u7387"],["REWIND","\u5feb\u9000"],["SEEK","\u8fdb\u5ea6"],["SKIP_AD","\u8df3\u8fc7\u5e7f\u544a"],["SKIP_TO_LIVE","\u8df3\u81f3\u5f53\u524d\u76f4\u64ad"],["STATISTICS","\u7edf\u8ba1\u4fe1\u606f"],["SUBTITLE_FORCED","\u5df2\u5f3a\u5236\u663e\u793a"],["SURROUND","\u73af\u7ed5\u58f0"],["TOGGLE_STEREOSCOPIC","\u5207\u6362\u7acb\u4f53\u58f0"],["UNDETERMINED_LANGUAGE","\u672a\u786e\u5b9a"],["UNMUTE","\u53d6\u6d88\u9759\u97f3"],
["UNRECOGNIZED_LANGUAGE","\u65e0\u6cd5\u8bc6\u522b"],["VOLUME","\u97f3\u91cf"]]));a.Xa("zh-TW",new Map([["AD_DURATION","\u5ee3\u544a\u9577\u5ea6"],["AD_PROGRESS","\u5ee3\u544a [AD_ON]/[NUM_ADS]"],["AD_STATISTICS","\u5ee3\u544a\u7d71\u8a08\u8cc7\u6599"],["AD_TIME","\u5ee3\u544a\uff1a[AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","\u81ea\u52d5"],["BACK","\u8fd4\u56de"],["CAPTIONS","\u5b57\u5e55"],["CAST","\u6295\u653e..."],["CHAPTERS","\u7ae0\u7bc0"],["DOWNLOAD_VIDEO_FRAME","\u5132\u5b58\u5f71\u7247\u5f71\u683c"],
["ENTER_LOOP_MODE","\u5faa\u74b0\u64ad\u653e\u76ee\u524d\u7684\u5f71\u7247"],["ENTER_PICTURE_IN_PICTURE","\u9032\u5165\u5b50\u6bcd\u756b\u9762"],["EXIT_FULL_SCREEN","\u9000\u51fa\u5168\u87a2\u5e55\u6a21\u5f0f"],["EXIT_LOOP_MODE","\u505c\u6b62\u5faa\u74b0\u64ad\u653e\u76ee\u524d\u7684\u5f71\u7247"],["EXIT_PICTURE_IN_PICTURE","\u96e2\u958b\u5b50\u6bcd\u756b\u9762"],["FAST_FORWARD","\u5feb\u8f49"],["FULL_SCREEN","\u5168\u87a2\u5e55"],["LANGUAGE","\u8a9e\u8a00"],["LIVE","\u76f4\u64ad"],["LOOP","\u5faa\u74b0\u64ad\u653e"],
["MORE_SETTINGS","\u986f\u793a\u66f4\u591a\u8a2d\u5b9a"],["MULTIPLE_LANGUAGES","\u591a\u7a2e\u8a9e\u8a00"],["MUTE","\u975c\u97f3"],["NOT_APPLICABLE","\u4e0d\u9069\u7528"],["OFF","\u95dc\u9589"],["ON","\u958b\u555f"],["PAUSE","\u66ab\u505c"],["PICTURE_IN_PICTURE","\u5b50\u6bcd\u756b\u9762"],["PLAY","\u64ad\u653e"],["PLAYBACK_RATE","\u64ad\u653e\u901f\u5ea6"],["QUALITY","\u97f3\u8cea"],["RECENTER_VR","\u91cd\u65b0\u7f6e\u4e2d"],["REPLAY","\u91cd\u64ad"],["RESOLUTION","\u89e3\u6790\u5ea6"],["REWIND",
"\u5012\u8f49"],["SEEK","\u641c\u5c0b"],["SKIP_AD","\u7565\u904e\u5ee3\u544a"],["SKIP_TO_LIVE","\u8df3\u81f3\u5f53\u524d\u76f4\u64ad"],["STATISTICS","\u7d71\u8a08\u8cc7\u6599"],["SUBTITLE_FORCED","\u5f37\u5236\u986f\u793a"],["SURROUND","\u74b0\u5834\u97f3\u6548"],["TOGGLE_STEREOSCOPIC","\u5207\u63db\u7acb\u9ad4\u5f71\u50cf"],["UNDETERMINED_LANGUAGE","\u4e0d\u660e"],["UNMUTE","\u53d6\u6d88\u975c\u97f3"],["UNRECOGNIZED_LANGUAGE","\u7121\u6cd5\u8fa8\u8b58"],["VOLUME","\u97f3\u91cf"]]));a.Li(navigator.languages||
[]);return a}S("shaka.ui.Controls",Z);Z.prototype.incrementRoll=Z.prototype.Bh;Z.prototype.incrementPitch=Z.prototype.Ah;Z.prototype.incrementYaw=Z.prototype.Ch;Z.prototype.toggleStereoscopicMode=Z.prototype.ae;Z.prototype.setVRFieldOfView=Z.prototype.Fm;Z.prototype.getVRFieldOfView=Z.prototype.Cl;Z.prototype.getVRNorth=Z.prototype.Dl;Z.prototype.isPlayingVR=Z.prototype.Zb;Z.prototype.canPlayVR=Z.prototype.Ng;Z.prototype.hideUI=Z.prototype.dj;Z.prototype.showUI=Z.prototype.Hm;
Z.prototype.isOpaque=Z.prototype.Ca;Z.prototype.hideAdUI=Z.prototype.cj;Z.prototype.showAdUI=Z.prototype.Xj;Z.prototype.togglePiP=Z.prototype.ed;Z.prototype.isPiPEnabled=Z.prototype.Nd;Z.prototype.isPiPAllowed=Z.prototype.Gf;Z.prototype.toggleFullScreen=Z.prototype.qg;Z.prototype.isFullScreenEnabled=Z.prototype.yb;Z.prototype.isFullScreenSupported=Z.prototype.xe;Z.prototype.hideSettingsMenus=Z.prototype.Xc;Z.prototype.anySettingsMenusAreOpen=Z.prototype.Nc;Z.prototype.setLastTouchEventTime=Z.prototype.Sj;
Z.prototype.getDisplayTime=Z.prototype.rh;Z.prototype.isCastAllowed=Z.prototype.Ll;Z.prototype.setSeeking=Z.prototype.ii;Z.prototype.isSeeking=Z.prototype.Rl;Z.prototype.getConfig=Z.prototype.Nk;Z.prototype.getClientSideAdContainer=Z.prototype.Mk;Z.prototype.getServerSideAdContainer=Z.prototype.vl;Z.prototype.getControlsContainer=Z.prototype.Qk;Z.prototype.getLocalPlayer=Z.prototype.$k;Z.prototype.getPlayer=Z.prototype.Yb;Z.prototype.getLocalVideo=Z.prototype.al;Z.prototype.getVideo=Z.prototype.Wc;
Z.prototype.getVideoContainer=Z.prototype.Fl;Z.prototype.getLocalization=Z.prototype.cl;Z.prototype.getCastProxy=Z.prototype.Jk;Z.prototype.getAd=Z.prototype.getAd;Z.prototype.setEnabledNativeControls=Z.prototype.Rj;Z.prototype.setEnabledShakaControls=Z.prototype.di;Z.prototype.configure=Z.prototype.configure;Z.prototype.loadComplete=Z.prototype.Ul;Z.prototype.allowCast=Z.prototype.tk;Z.registerSeekBar=function(a){XI=a};Z.registerElement=FI;Z.prototype.destroy=Z.prototype.destroy;
var GI=new Map,XI=new OH;function eJ(a,b){function c(){return fJ(d)}hH.call(this,a,b);var d=this;this.m=this.controls.g;this.l=this.controls.i;this.u=this.controls.l;this.j=[];gJ(this);this.g=W("div");this.g.classList.add("shaka-overflow-menu");this.g.classList.add("shaka-no-propagation");this.g.classList.add("shaka-show-controls-on-mouse-over");this.g.classList.add("shaka-hidden");this.l.appendChild(this.g);hJ(this);this.eventManager.o(this.localization,"locale-updated",function(){iJ(d)});this.eventManager.o(this.localization,
"locale-changed",function(){iJ(d)});this.eventManager.o(this.adManager,"ad-started",function(){d.ad&&d.ad.isLinear()&&nH(d.h,!1)});this.eventManager.o(this.adManager,"ad-stopped",function(){nH(d.h,!0)});this.eventManager.o(this.controls,"submenuopen",function(){nH(d.g,!1)});this.eventManager.o(this.g,"touchstart",function(e){d.controls.Sj(Date.now());e.stopPropagation()});this.eventManager.o(this.h,"click",function(){d.controls.Ca()&&jJ(d)});iJ(this);this.ad&&this.ad.isLinear()&&nH(this.h,!1);this.i=
null;window.ResizeObserver?(this.i=new ResizeObserver(c),this.i.observe(this.controls.l)):this.eventManager.o(window,"resize",c)}ma(eJ,hH);eJ.prototype.release=function(){this.l=null;for(var a=u(this.j),b=a.next();!b.done;b=a.next())b.value.release();this.j=[];this.i&&(this.i.disconnect(),this.i=null);hH.prototype.release.call(this)};function kJ(a,b){lJ.set(a,b)}
function gJ(a){a.h=Xj();a.h.classList.add("shaka-overflow-menu-button");a.h.classList.add("shaka-no-propagation");a.h.classList.add("shaka-tooltip");(new iH(a.h)).use("M433-80q-27 0-46.5-18T363-142l-9-66q-13-5-24.5-12T307-235l-62 26q-25 11-50 2t-39-32l-47-82q-14-23-8-49t27-43l53-40q-1-7-1-13.5v-27q0-6.5 1-13.5l-53-40q-21-17-27-43t8-49l47-82q14-23 39-32t50 2l62 26q11-8 23-15t24-12l9-66q4-26 23.5-44t46.5-18h94q27 0 46.5 18t23.5 44l9 66q13 5 24.5 12t22.5 15l62-26q25-11 50-2t39 32l47 82q14 23 8 49t-27 43l-53 40q1 7 1 13.5v27q0 6.5-2 13.5l53 40q21 17 27 43t-8 49l-48 82q-14 23-39 32t-50-2l-60-26q-11 8-23 15t-24 12l-9 66q-4 26-23.5 44T527-80h-94Zm49-260q58 0 99-41t41-99q0-58-41-99t-99-41q-59 0-99.5 41T342-480q0 58 40.5 99t99.5 41Z");
var b=W("span");b.classList.add("shaka-overflow-quality-mark");b.style.display="none";a.h.appendChild(b);a.parent.appendChild(a.h)}function hJ(a){for(var b=u(a.m.overflowMenuButtons),c=b.next();!c.done;c=b.next())c=c.value,lJ.get(c)?(c=lJ.get(c),a.j.push(c.create(a.g,a.controls))):bb("Unrecognized overflow menu element requested:",c)}
function jJ(a){if(a.controls.Nc())a.controls.Xc();else{nH(a.g,!0);uI(a.controls);var b=function(c){return c.classList.contains("shaka-hidden")==0};qb(a.g.childNodes,b)&&rb(a.g.childNodes,b)[0].focus();fJ(a)}}function iJ(a){a.h.ariaLabel=a.localization.resolve("MORE_SETTINGS")}function fJ(a){var b=a.g.getBoundingClientRect(),c=window.getComputedStyle(a.g),d=parseFloat(c.paddingTop);c=parseFloat(c.paddingBottom);var e=a.u.getBoundingClientRect();a.g.style.maxHeight=b.bottom-e.top-d-c+"px"}
S("shaka.ui.OverflowMenu",eJ);eJ.registerElement=kJ;function mJ(){}mJ.prototype.create=function(a,b){return new eJ(a,b)};FI("overflow_menu",new mJ);var lJ=new Map;function nJ(a,b){function c(e){return d.i[e]}hH.call(this,a,b);var d=this;this.h=Xj();this.h.classList.add("shaka-ad-statistics-button");this.u=new iH(this.h,"M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Zm0-80h560v-560H200v560Zm0-560v560-560Zm120 200q-17 0-28.5 11.5T280-520v200q0 17 11.5 28.5T320-280q17 0 28.5-11.5T360-320v-200q0-17-11.5-28.5T320-560Zm160-120q-17 0-28.5 11.5T440-640v320q0 17 11.5 28.5T480-280q17 0 28.5-11.5T520-320v-320q0-17-11.5-28.5T480-680Zm160 240q-17 0-28.5 11.5T600-400v80q0 17 11.5 28.5T640-280q17 0 28.5-11.5T680-320v-80q0-17-11.5-28.5T640-440Z");
a=W("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-simple-overflow-button-label-inline");this.A=W("span");a.appendChild(this.A);this.l=W("span");this.l.classList.add("shaka-current-selection-span");a.appendChild(this.l);this.h.appendChild(a);this.parent.appendChild(this.h);this.g=W("div");this.g.classList.add("shaka-no-propagation");this.g.classList.add("shaka-show-controls-on-mouse-over");this.g.classList.add("shaka-ad-statistics-container");this.g.classList.add("shaka-hidden");
this.controls.i.appendChild(this.g);this.D=[];this.i=this.adManager.getStats();nH(this.h,this.i.started>0);this.m=new Map;this.C=(new Map).set("loadTimes",function(e){var f=0;e=u(d.i[e]);for(var g=e.next();!g.done;g=e.next())f+=parseFloat(g.value);return f}).set("averageLoadTime",c).set("started",c).set("overlayAds",c).set("playedCompletely",c).set("skipped",c).set("errors",c);this.j=new Gf(function(){d.i=d.adManager.getStats();for(var e=u(d.D),f=e.next();!f.done;f=e.next())f=f.value,d.m.get(f).textContent=
d.C.get(f)(f)});oJ(this);pJ(this);this.eventManager.o(this.localization,"locale-updated",function(){oJ(d)});this.eventManager.o(this.localization,"locale-changed",function(){oJ(d)});this.eventManager.o(this.h,"click",function(){d.controls.Ca()&&(qJ(d),oJ(d))});this.eventManager.o(this.player,"loading",function(){nH(d.h,!1)});this.eventManager.o(this.adManager,"ad-started",function(){nH(d.h,!0)})}ma(nJ,hH);
function qJ(a){a.g.classList.contains("shaka-hidden")?(a.u.use("M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Zm120-440q-17 0-28.5 11.5T280-520v200q0 17 11.5 28.5T320-280q17 0 28.5-11.5T360-320v-200q0-17-11.5-28.5T320-560Zm160-120q-17 0-28.5 11.5T440-640v320q0 17 11.5 28.5T480-280q17 0 28.5-11.5T520-320v-320q0-17-11.5-28.5T480-680Zm160 240q-17 0-28.5 11.5T600-400v80q0 17 11.5 28.5T640-280q17 0 28.5-11.5T680-320v-80q0-17-11.5-28.5T640-440Z"),a.j.xa(.1),
nH(a.g,!0)):(a.u.use("M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Zm0-80h560v-560H200v560Zm0-560v560-560Zm120 200q-17 0-28.5 11.5T280-520v200q0 17 11.5 28.5T320-280q17 0 28.5-11.5T360-320v-200q0-17-11.5-28.5T320-560Zm160-120q-17 0-28.5 11.5T440-640v320q0 17 11.5 28.5T480-280q17 0 28.5-11.5T520-320v-320q0-17-11.5-28.5T480-680Zm160 240q-17 0-28.5 11.5T600-400v80q0 17 11.5 28.5T640-280q17 0 28.5-11.5T680-320v-80q0-17-11.5-28.5T640-440Z"),
a.j.stop(),nH(a.g,!1))}function oJ(a){a.A.textContent=a.localization.resolve("AD_STATISTICS");a.h.ariaLabel=a.localization.resolve("AD_STATISTICS");a.l.textContent=a.localization.resolve(a.g.classList.contains("shaka-hidden")?"OFF":"ON")}function rJ(a,b){var c=W("div"),d=W("label");d.textContent=b+":";c.appendChild(d);d=W("span");d.textContent=a.C.get(b)(b);c.appendChild(d);a.m.set(b,d);return c}
function pJ(a){var b=W("div");b.classList.add("shaka-no-propagation");b.classList.add("shaka-statistics-close");var c=(new iH(b,"M480-424 284-228q-11 11-28 11t-28-11q-11-11-11-28t11-28l196-196-196-196q-11-11-11-28t11-28q11-11 28-11t28 11l196 196 196-196q11-11 28-11t28 11q11 11 11 28t-11 28L536-480l196 196q11 11 11 28t-11 28q-11 11-28 11t-28-11L480-424Z")).g;c.classList.add("material-icons","notranslate");a.g.appendChild(b);a.eventManager.o(c,"click",function(){qJ(a)});b=u(a.controls.g.adStatisticsList);
for(c=b.next();!c.done;c=b.next())c=c.value,c in a.i?(a.g.appendChild(rJ(a,c)),a.D.push(c)):bb("Unrecognized ad statistic element:",c)}nJ.prototype.release=function(){this.j.stop();this.j=null;hH.prototype.release.call(this)};S("shaka.ui.AdStatisticsButton",nJ);function sJ(){}sJ.prototype.create=function(a,b){return new nJ(a,b)};kJ("ad_statistics",new sJ);sH("ad_statistics",new sJ);function tJ(a,b){hH.call(this,a,b);var c=this;this.g=Xj();this.g.classList.add("shaka-airplay-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";(new iH(this.g)).use("M80-280v-480q0-33 23.5-56.5T160-840h640q33 0 56.5 23.5T880-760v480q0 33-23.5 56.5T800-200h-80q-17 0-28.5-11.5T680-240q0-17 11.5-28.5T720-280h80v-480H160v480h80q17 0 28.5 11.5T280-240q0 17-11.5 28.5T240-200h-80q-33 0-56.5-23.5T80-280Zm232 160q-14 0-22-9.5t-8-20.5q0-5 2-10.5t7-10.5l161-161q6-6 13-9t15-3q8 0 15 3t13 9l161 161q5 5 7 10.5t2 10.5q0 11-8 20.5t-22 9.5H312Zm168-360Z");
window.WebKitPlaybackTargetAvailabilityEvent||this.g.classList.add("shaka-hidden");a=W("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.i=W("span");a.appendChild(this.i);this.h=W("span");this.h.classList.add("shaka-current-selection-span");a.appendChild(this.h);this.g.appendChild(a);this.parent.appendChild(this.g);uJ(this);vJ(this);this.eventManager.o(this.localization,"locale-updated",function(){uJ(c)});this.eventManager.o(this.localization,
"locale-changed",function(){uJ(c)});this.eventManager.o(this.g,"click",function(){c.controls.Ca()&&c.controls.Wc().webkitShowPlaybackTargetPicker()});a=this.controls.Wc();this.eventManager.o(a,"webkitplaybacktargetavailabilitychanged",function(d){var e=c.player.l==Tr;nH(c.g,d.availability=="available"&&e)});this.eventManager.o(a,"webkitcurrentplaybacktargetiswirelesschanged",function(){vJ(c)})}ma(tJ,hH);
function vJ(a){var b=a.controls.Wc();a.g.ariaPressed=b&&b.webkitCurrentPlaybackTargetIsWireless?"true":"false"}function uJ(a){a.g.ariaLabel=a.localization.resolve("AIRPLAY");a.i.textContent=a.localization.resolve("AIRPLAY")}S("shaka.ui.AirPlayButton",tJ);function wJ(){}wJ.prototype.create=function(a,b){return new tJ(a,b)};kJ("airplay",new wJ);FI("airplay",new wJ);function xJ(a,b){hH.call(this,a,b);var c=this;this.g=document.createElement("canvas");this.g.style.position="absolute";this.g.style.top="0";this.g.style.left="0";this.g.style.pointerEvents="none";this.parent.appendChild(this.g);yJ(this);this.i=this.h=null;window.ResizeObserver?(this.i=new ResizeObserver(function(){return yJ(c)}),this.i.observe(this.parent)):window.addEventListener("resize",function(){return yJ(c)})}ma(xJ,hH);function zJ(a){return(a=a.g.getContext("2d"))?a:null}
function yJ(a){a.g.width=a.parent.offsetWidth;a.g.height=a.parent.offsetHeight}
xJ.prototype.kg=function(a,b){a={type:"static",text:a,position:"top-right",color:"rgba(255, 255, 255, 0.7)",size:20,alpha:.7,interval:2E3,skip:500,displayDuration:2E3,transitionDuration:.5};b=Object.assign({},a,b||a);if(b.type==="static"){if(a=zJ(this)){a.clearRect(0,0,this.g.width,this.g.height);a.globalAlpha=b.alpha;a.fillStyle=b.color;a.font=b.size+"px Arial";var c=a.measureText(b.text);switch(b.position){case "top-left":c=20;var d=b.size+20;break;case "top-right":c=this.g.width-c.width-20;d=b.size+
20;break;case "bottom-left":c=20;d=this.g.height-20;break;case "bottom-right":c=this.g.width-c.width-20;d=this.g.height-20;break;default:c=(this.g.width-c.width)/2,d=(this.g.height+b.size)/2}a.fillText(b.text,c,d)}}else b.type==="dynamic"&&AJ(this,b)};
function AJ(a,b){function c(){if(a.h){e.clearRect(0,0,a.g.width,a.g.height);switch(h){case "fadeIn":g=Math.min(b.alpha,g+l);g>=b.alpha&&(h="display");break;case "display":--k<=0&&(h="fadeOut");break;case "fadeOut":g=Math.max(0,g-l),g<=0&&(h="transition",f=d(),k=Math.round(b.displayDuration*60),h="fadeIn")}g>0&&(e.globalAlpha=g,e.fillStyle=b.color,e.font=b.size+"px Arial",e.fillText(b.text,f.left,f.top));a.h&&(a.h=requestAnimationFrame(c))}}function d(){e.font=b.size+"px Arial";var n=e.measureText(b.text).width,
q=b.size;n=[{left:20,top:q+20},{left:a.g.width-n-20,top:q+20},{left:20,top:a.g.height-20},{left:a.g.width-n-20,top:a.g.height-20},{left:(a.g.width-n)/2,top:(a.g.height+q)/2}];q=n[m];m=(m+1)%n.length;return q}var e=a.g.getContext("2d"),f={left:0,top:0},g=0,h="fadeIn",k=Math.round(b.displayDuration*60),l=1/(Math.round(b.transitionDuration*60)/2),m=0;f=d();a.h=requestAnimationFrame(c)}
xJ.prototype.cg=function(){this.h&&(cancelAnimationFrame(this.h),this.h=null);var a=zJ(this);a&&a.clearRect(0,0,this.g.width,this.g.height)};xJ.prototype.release=function(){var a=this;this.g&&this.g.parentNode&&this.g.parentNode.removeChild(this.g);this.i?(this.i.disconnect(),this.i=null):window.removeEventListener("resize",function(){return yJ(a)});hH.prototype.release.call(this)};S("shaka.ui.Watermark",xJ);xJ.prototype.removeWatermark=xJ.prototype.cg;xJ.prototype.setTextWatermark=xJ.prototype.kg;function BJ(a,b,c,d){d=d===void 0?null:d;this.j=a;this.l=b;this.h=CJ(this);var e="",f=!1;b.dataset&&b.dataset.shakaPlayerCastReceiverId?(f=b.dataset,e=f.shakaPlayerCastReceiverId,f=f.shakaPlayerCastAndroidReceiverCompatible==="true"):c.dataset&&c.dataset.shakaPlayerCastReceiverId&&(f=c.dataset,e=f.shakaPlayerCastReceiverId,f=f.shakaPlayerCastAndroidReceiverCompatible==="true");e.length&&(this.h.castReceiverAppId=e,this.h.castAndroidReceiverCompatible=f);b.dataset.shakaPlayerContainer="";b.ui=this;
this.Gh()&&b.classList.add("shaka-mobile");this.g=new Z(a,b,c,d,this.h);c.controls||a.ji(b);b.ui=this;c.ui=this;this.i=null}p=BJ.prototype;p.destroy=function(a){a=a===void 0?!1:a;var b=this;return Q(function(c){if(c.g==1)return b.g?E(c,b.g.destroy(a),2):c.B(2);if(c.g!=4)return b.g=null,b.j?E(c,b.j.destroy(),4):c.B(4);b.j=null;b.i=null;H(c)})};p.Gh=function(){return Tb().Oa()=="MOBILE"};p.Hh=function(){return Tb().Oa()=="TV"};
p.getConfiguration=function(){var a=CJ(this);Qn(a,this.h,CJ(this),{},"");return a};
p.configure=function(a,b){arguments.length==2&&typeof a=="string"&&(a=Rn(a,b));var c=Object.assign({},this.h);Qn(c,a,CJ(this),{},"");var d=Tn(c,this.h);if(Object.keys(d).length&&(this.h=c,this.g.configure(this.h),this.g.dispatchEvent(new T("uiupdated")),(c=this.h.castSenderUrl)&&this.h.castReceiverAppId&&window.chrome&&!chrome.cast&&!this.Hh())){d=!1;for(var e=u(document.getElementsByTagName("script")),f=e.next();!f.done;f=e.next())if(f.value.src===c){d=!0;break}d||(d=document.createElement("script"),
d.src=c,d.defer=!0,document.head.appendChild(d))}};p.Pk=function(){return this.g};p.Dm=function(a){this.g.di(a)};p.kg=function(a,b){a&&!this.i&&this.l&&this.g&&(this.i=new xJ(this.l,this.g));this.i&&this.i.kg(a,b)};p.cg=function(){this.i&&this.i.cg()};
function CJ(a){var b="play_pause skip_previous skip_next mute volume time_and_duration spacer overflow_menu".split(" ");window.chrome&&b.push("cast");"remote"in HTMLMediaElement.prototype?b.push("remote"):window.WebKitPlaybackTargetAvailabilityEvent&&b.push("airplay");b.push("fullscreen");b={controlPanelElements:b,overflowMenuButtons:"captions quality language chapter picture_in_picture playback_rate recenter_vr toggle_stereoscopic".split(" "),statisticsList:"width height currentCodecs corruptedFrames decodedFrames droppedFrames drmTimeSeconds licenseTime liveLatency loadLatency bufferingTime manifestTimeSeconds estimatedBandwidth streamBandwidth maxSegmentDuration pauseTime playTime completionPercent manifestSizeBytes bytesDownloaded nonFatalErrorCount manifestPeriodCount manifestGapCount".split(" "),
adStatisticsList:"loadTimes averageLoadTime started overlayAds playedCompletely skipped errors".split(" "),contextMenuElements:["loop","picture_in_picture","save_video_frame","statistics","ad_statistics"],playbackRates:[.5,.75,1,1.25,1.5,1.75,2],fastForwardRates:[2,4,8,1],rewindRates:[-1,-2,-4,-8],addSeekBar:!0,addBigPlayButton:!1,customContextMenu:!1,castReceiverAppId:"",castAndroidReceiverCompatible:!1,clearBufferOnQualityChange:!0,showUnbufferedStart:!1,seekBarColors:{base:"rgba(255, 255, 255, 0.3)",
buffered:"rgba(255, 255, 255, 0.54)",played:"rgb(255, 255, 255)",adBreaks:"rgb(255, 204, 0)"},volumeBarColors:{base:"rgba(255, 255, 255, 0.54)",level:"rgb(255, 255, 255)"},qualityMarks:{720:"",1080:"HD",1440:"2K",2160:"4K",4320:"8K"},trackLabelFormat:DJ,textTrackLabelFormat:DJ,fadeDelay:0,closeMenusDelay:2,doubleClickForFullscreen:!0,singleClickForPlayAndPause:!0,enableKeyboardPlaybackControls:!0,enableFullscreenOnRotation:!1,forceLandscapeOnFullscreen:!1,enableTooltips:!0,keyboardSeekDistance:5,
keyboardLargeSeekDistance:60,fullScreenElement:a.l,preferDocumentPictureInPicture:!0,showAudioChannelCountVariants:!0,seekOnTaps:!1,tapSeekDistance:10,refreshTickInSeconds:.125,displayInVrMode:!1,defaultVrProjectionMode:"equirectangular",setupMediaSession:!0,preferVideoFullScreenInVisionOS:!0,showAudioCodec:!0,showVideoCodec:!0,castSenderUrl:"https://www.gstatic.com/cv/js/sender/v1/cast_sender.js",enableKeyboardPlaybackControlsInWindow:!1,alwaysShowVolumeBar:!1};if(a.Gh()){b.addBigPlayButton=!0;b.singleClickForPlayAndPause=
!1;b.seekOnTaps=!0;b.enableTooltips=!1;b.doubleClickForFullscreen=!1;a=Tb();b.enableFullscreenOnRotation=a.Ja()!=="WEBKIT";b.forceLandscapeOnFullscreen=!0;var c=["play_pause","skip_previous","skip_next","volume"];b.controlPanelElements=b.controlPanelElements.filter(function(e){return!c.includes(e)});b.overflowMenuButtons=b.overflowMenuButtons.filter(function(e){return!c.includes(e)});b.contextMenuElements=b.contextMenuElements.filter(function(e){return!c.includes(e)})}else if(a.Hh()){b.addBigPlayButton=
!0;b.singleClickForPlayAndPause=!1;b.enableTooltips=!1;b.doubleClickForFullscreen=!1;var d="play_pause cast remote airplay volume save_video_frame".split(" ");b.controlPanelElements=b.controlPanelElements.filter(function(e){return!d.includes(e)});b.overflowMenuButtons=b.overflowMenuButtons.filter(function(e){return!d.includes(e)});b.contextMenuElements=b.contextMenuElements.filter(function(e){return!d.includes(e)})}return b}
function EJ(){var a,b,c,d,e,f,g,h,k,l,m,n,q,r,t,v,w,z,y,A,C,F;return Q(function(D){switch(D.g){case 1:wD();if(!pr())return FJ("shaka-ui-load-failed",GJ),D.return();a=document.querySelectorAll("[data-shaka-player-container]");b=document.querySelectorAll("[data-shaka-player]");c=document.querySelectorAll("[data-shaka-player-canvas]");d=document.querySelectorAll("[data-shaka-player-vr-canvas]");if(!b.length&&!a.length){D.B(2);break}if(b.length&&!a.length){e=u(b);for(f=e.next();!f.done;f=e.next())g=f.value,
g.ui||(h=document.createElement("div"),k=g.parentElement,k.replaceChild(h,g),h.appendChild(g),l=HJ(h,c,d),m=l.lj,n=l.nk,IJ(h,g,m,n));D.B(2);break}q=u(a);r=q.next();case 4:if(r.done){D.B(2);break}t=r.value;if(t.ui){D.B(5);break}v=null;w=u(b);for(z=w.next();!z.done;z=w.next())if(y=z.value,y.parentElement==t){v=y;break}v||(v=document.createElement("video"),v.setAttribute("playsinline",""),t.appendChild(v));A=HJ(t,c,d);C=A.lj;F=A.nk;sa(D,7);return E(D,IJ(t,v,C,F),9);case 9:ua(D,5);break;case 7:return va(D),
FJ("shaka-ui-load-failed",JJ),D.return();case 5:r=q.next();D.B(4);break;case 2:FJ("shaka-ui-loaded"),H(D)}})}function FJ(a,b){var c=null;b!=void 0&&(c={reasonCode:b});a=new CustomEvent(a,{detail:c});document.dispatchEvent(a)}
function IJ(a,b,c,d){var e,f,g,h,k,l,m,n,q,r;return Q(function(t){switch(t.g){case 1:e=new X;f=new BJ(e,a,b,d?d:null);e.Gi(c);b.controls&&f.g.Rj(!0);g=[];if(h=b.getAttribute("src"))g.push(h),b.removeAttribute("src");k=u(b.getElementsByTagName("source"));for(l=k.next();!l.done;l=k.next())m=l.value,g.push(m.src),b.removeChild(m);return E(t,e.ec(b),2);case 2:n=u(g),q=n.next();case 3:if(q.done){t.B(0);break}r=q.value;sa(t,6);return E(t,f.g.Yb().load(r),8);case 8:t.B(0);break;case 6:va(t);case 4:q=n.next(),
t.B(3)}})}function HJ(a,b,c){var d=null;b=u(b);for(var e=b.next();!e.done;e=b.next())if(e=e.value,e.parentElement==a){d=e;break}d||(d=document.createElement("canvas"),d.classList.add("shaka-canvas-container"),a.appendChild(d));b=null;c=u(c);for(e=c.next();!e.done;e=c.next())if(e=e.value,e.parentElement==a){b=e;break}return{lj:d,nk:b}}S("shaka.ui.Overlay",BJ);BJ.prototype.removeWatermark=BJ.prototype.cg;BJ.prototype.setTextWatermark=BJ.prototype.kg;BJ.prototype.setEnabled=BJ.prototype.Dm;
BJ.prototype.getControls=BJ.prototype.Pk;BJ.prototype.configure=BJ.prototype.configure;BJ.prototype.getConfiguration=BJ.prototype.getConfiguration;BJ.prototype.isSmartTV=BJ.prototype.Hh;BJ.prototype.isMobile=BJ.prototype.Gh;BJ.prototype.destroy=BJ.prototype.destroy;var DJ=0;BJ.TrackLabelFormat={LANGUAGE:DJ,ROLE:1,LANGUAGE_ROLE:2,LABEL:3};var GJ=0,JJ=1;BJ.FailReasonCode={NO_BROWSER_SUPPORT:GJ,PLAYER_FAILED_TO_LOAD:JJ};
document.readyState=="complete"?Q(function(a){if(a.g==1)return E(a,Promise.resolve(),2);EJ();H(a)}):window.addEventListener("load",EJ);function KJ(a){function b(d){return{codecs:d.codecs,channelCount:d.channelCount,language:d.language,roles:d.roles,spatialAudio:d.spatialAudio}}var c=b(a[0]);return a.every(function(d){return JSON.stringify(b(d))===JSON.stringify(c)})}
function LJ(a,b,c,d,e,f,g,h){function k(I){var J="";I=="aac"?J="AAC":I==="ac-3"?J="Dolby":I==="ec-3"?J="DD+":I==="ac-4"?J="Dolby AC-4":I==="opus"?J="Opus":I==="flac"&&(J="fLaC");return J?" "+J:J}function l(I){var J="";I>=5&&(J=" "+e.resolve("SURROUND"));return J}function m(I,J,L,N,P,O){J=[I,J,O];g&&N!=null&&J.push(N);h&&n(I)&&P&&J.push(P);L&&f==3&&J.push(L);return J.join(": ")}function n(I){return r.has(I)&&r.get(I).size>1}var q=a.find(function(I){return I.active==1});a.length>1&&a[0].label&&f!=3&&
KJ(a)&&(f=3);for(var r=new Map,t=u(a),v=t.next();!v.done;v=t.next())v=v.value,v.codecs&&(r.has(v.language)||r.set(v.language,new Set),r.get(v.language).add(mf(v.codecs)));t=jH(b);bk(b);b.appendChild(t);t=new Set;q=q?m(q.language,q.roles.join(", "),q.label,q.channelsCount,q.codecs&&mf(q.codecs),q.spatialAudio):"";a=u(a);var w=a.next();for(v={};!w.done;v={dc:void 0},w=a.next()){v.dc=w.value;w=v.dc.language;var z=v.dc.roles.join(", "),y=v.dc.label,A=v.dc.channelsCount,C=v.dc.codecs&&mf(v.dc.codecs),
F=v.dc.spatialAudio,D=m(w,z,y,A,C,F);if(!t.has(D)){t.add(D);var B=Xj();B.addEventListener("click",function(I){return function(){c(I.dc)}}(v));var G=W("span");B.appendChild(G);G.textContent=MJ(w,e);var K="";h&&g&&F&&(C=="ec-3"||C=="ac-4")?K+=" Dolby Atmos":(h&&n(w)&&(K+=k(C)),g&&(K+=l(A)));switch(f){case DJ:G.textContent+=K;break;case 1:G.textContent+=K;z?G.textContent=z:(bb("Track #"+JSON.stringify(v.dc)+" does not have a role, but the UI is configured to only show role."),G.textContent="?");break;
case 2:G.textContent+=K;z&&(G.textContent+=": "+z);break;case 3:y?G.textContent=y:(bb("Track #"+JSON.stringify(v.dc)+" does not have a label, but the UI is configured to only show labels."),G.textContent="?")}D==q&&(B.appendChild(mH()),G.classList.add("shaka-chosen-item"),B.ariaSelected="true",d.textContent=G.textContent);b.appendChild(B)}}}
function NJ(a,b,c,d,e,f,g){function h(A,C,F){A=[A,C];F&&g==3&&A.push(F);return A.join(": ")}var k=a.find(function(A){return A.active==1}),l=jH(b);bk(b);b.appendChild(l);l=new Set;k=k?h(k.language,k.roles.join(", "),k.label):"";a=u(a);for(var m=a.next(),n={};!m.done;n={fd:void 0},m=a.next()){n.fd=m.value;m=n.fd.language;var q=n.fd.forced,r=f.resolve("SUBTITLE_FORCED"),t=n.fd.roles.join(", "),v=n.fd.label,w=h(m,t,v);if(!l.has(w)){l.add(w);var z=Xj();z.addEventListener("click",function(A){return function(){c(A.fd)}}(n));
var y=W("span");z.appendChild(y);y.textContent=MJ(m,f);switch(g){case DJ:q&&(y.textContent+=" ("+r+")");break;case 1:t?y.textContent=t:(bb("Track #"+n.fd.id+" does not have a role, but the UI is configured to only show role."),y.textContent="?");q&&(y.textContent+=" ("+r+")");break;case 2:t&&(y.textContent+=": "+t);q&&(y.textContent+=" ("+r+")");break;case 3:v?y.textContent=v:(bb("Track #"+n.fd.id+" does not have a label, but the UI is configured to only show labels."),y.textContent="?")}d&&w==k&&
(z.appendChild(mH()),y.classList.add("shaka-chosen-item"),z.ariaSelected="true",e.textContent=y.textContent);b.appendChild(z)}}}function MJ(a,b){if(!a&&!b)return"";switch(a){case "mul":return b.resolve("MULTIPLE_LANGUAGES");case "und":return b.resolve("UNDETERMINED_LANGUAGE");case "zxx":return b.resolve("NOT_APPLICABLE")}var c=Hc(a);return a in ep?ep[a]:c in ep?ep[c]+" ("+a+")":b.resolve("UNRECOGNIZED_LANGUAGE")+" ("+a+")"};function OJ(a,b,c){function d(){return PJ(e)}hH.call(this,a,b);var e=this;this.m=this.controls.l;QJ(this,c);RJ(this);SJ(this);this.eventManager.o(this.button,"click",function(){e.controls.Ca()&&(e.menu.classList.contains("shaka-hidden")?(e.controls.dispatchEvent(new T("submenuopen")),nH(e.menu,!0),lH(e.menu),PJ(e)):nH(e.menu,!1))});this.j=null;window.ResizeObserver?(this.j=new ResizeObserver(d),this.j.observe(this.controls.l)):this.eventManager.o(window,"resize",d)}ma(OJ,hH);
OJ.prototype.release=function(){this.j&&(this.j.disconnect(),this.j=null);hH.prototype.release.call(this)};
function QJ(a,b){a.button=Xj();a.button.classList.add("shaka-overflow-button");a.icon=new iH(a.button,b);b=W("label");b.classList.add("shaka-overflow-button-label");b.classList.add("shaka-overflow-menu-only");b.classList.add("shaka-overflow-button-label-inline");a.nameSpan=W("span");b.appendChild(a.nameSpan);a.currentSelection=W("span");a.currentSelection.classList.add("shaka-current-selection-span");b.appendChild(a.currentSelection);a.button.appendChild(b);a.parent.appendChild(a.button)}
function RJ(a){a.menu=W("div");a.menu.classList.add("shaka-no-propagation");a.menu.classList.add("shaka-show-controls-on-mouse-over");a.menu.classList.add("shaka-settings-menu");a.menu.classList.add("shaka-hidden");a.backButton=Xj();a.backButton.classList.add("shaka-back-to-overflow-button");a.menu.appendChild(a.backButton);a.eventManager.o(a.backButton,"click",function(){a.controls.Xc()});a.u=new iH(a.backButton,"M480-424 284-228q-11 11-28 11t-28-11q-11-11-11-28t11-28l196-196-196-196q-11-11-11-28t11-28q11-11 28-11t28 11l196 196 196-196q11-11 28-11t28 11q11 11 11 28t-11 28L536-480l196 196q11 11 11 28t-11 28q-11 11-28 11t-28-11L480-424Z");
a.backSpan=W("span");a.backButton.appendChild(a.backSpan);a.controls.i.appendChild(a.menu)}
function SJ(a){a.parent.classList.contains("shaka-overflow-menu")&&(a.u.use("m432-480 156 156q11 11 11 28t-11 28q-11 11-28 11t-28-11L348-452q-6-6-8.5-13t-2.5-15q0-8 2.5-15t8.5-13l184-184q11-11 28-11t28 11q11 11 11 28t-11 28L432-480Z"),a.eventManager.o(a.menu,"click",function(){function b(c){return c.classList.contains("shaka-hidden")==0}nH(a.menu,!1);nH(a.parent,!0);qb(a.parent.childNodes,b)&&rb(a.parent.childNodes,b)[0].focus();uI(a.controls);PJ(a)}))}
function PJ(a){var b=a.menu.getBoundingClientRect(),c=window.getComputedStyle(a.menu),d=parseFloat(c.paddingTop);c=parseFloat(c.paddingBottom);var e=a.m.getBoundingClientRect();a.menu.style.maxHeight=b.bottom-e.top-d-c+"px"}S("shaka.ui.SettingsMenu",OJ);function TJ(a,b){OJ.call(this,a,b,"M480-80q-82 0-155-31.5t-127.5-86Q143-252 111.5-325T80-480q0-83 31.5-155.5t86-127Q252-817 325-848.5T480-880q83 0 155.5 31.5t127 86q54.5 54.5 86 127T880-480q0 82-31.5 155t-86 127.5q-54.5 54.5-127 86T480-80Zm0-82q26-36 45-75t31-83H404q12 44 31 83t45 75Zm-104-16q-18-33-31.5-68.5T322-320H204q29 50 72.5 87t99.5 55Zm208 0q56-18 99.5-55t72.5-87H638q-9 38-22.5 73.5T584-178ZM170-400h136q-3-20-4.5-39.5T300-480q0-21 1.5-40.5T306-560H170q-5 20-7.5 39.5T160-480q0 21 2.5 40.5T170-400Zm216 0h188q3-20 4.5-39.5T580-480q0-21-1.5-40.5T574-560H386q-3 20-4.5 39.5T380-480q0 21 1.5 40.5T386-400Zm268 0h136q5-20 7.5-39.5T800-480q0-21-2.5-40.5T790-560H654q3 20 4.5 39.5T660-480q0 21-1.5 40.5T654-400Zm-16-240h118q-29-50-72.5-87T584-782q18 33 31.5 68.5T638-640Zm-234 0h152q-12-44-31-83t-45-75q-26 36-45 75t-31 83Zm-200 0h118q9-38 22.5-73.5T376-782q-56 18-99.5 55T204-640Z");
var c=this;this.button.classList.add("shaka-language-button");this.button.classList.add("shaka-tooltip-status");this.menu.classList.add("shaka-audio-languages");this.eventManager.o(this.localization,"locale-updated",function(){UJ(c)});this.eventManager.o(this.localization,"locale-changed",function(){UJ(c)});this.eventManager.o(this.player,"loading",function(){VJ(c)});this.eventManager.o(this.player,"loaded",function(){VJ(c)});this.eventManager.o(this.player,"unloading",function(){VJ(c)});this.eventManager.o(this.player,
"audiotrackschanged",function(){VJ(c)});UJ(this);VJ(this)}ma(TJ,OJ);
function VJ(a){var b=a.player.getAudioTracks()||[];LJ(b,a.menu,function(c){a.player.Nj(c);var d={preferredAudioLanguage:c.language,preferSpatialAudio:c.spatialAudio};c.label&&(d.preferredAudioLabel=c.label);c.channelsCount&&(d.preferredAudioChannelCount=c.channelsCount);a.player.configure(d)},a.currentSelection,a.localization,a.controls.g.trackLabelFormat,a.controls.g.showAudioChannelCountVariants,a.controls.g.showAudioCodec);lH(a.menu);a.controls.dispatchEvent(new T("languageselectionupdated"));
a.button.setAttribute("shaka-status",a.currentSelection.innerText);nH(a.button,a.menu.getElementsByTagName("button").length>2)}function UJ(a){a.backButton.ariaLabel=a.localization.resolve("BACK");a.button.ariaLabel=a.localization.resolve("LANGUAGE");a.nameSpan.textContent=a.localization.resolve("LANGUAGE");a.backSpan.textContent=a.localization.resolve("LANGUAGE")}S("shaka.ui.AudioLanguageSelection",TJ);function WJ(){}WJ.prototype.create=function(a,b){return new TJ(a,b)};kJ("language",new WJ);
FI("language",new WJ);function XJ(a,b){hH.call(this,a,b);var c=this;this.h=this.controls.F;this.g=Xj();this.g.classList.add("shaka-cast-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.l=new iH(this.g,"M880-240q0 33-23.5 56.5T800-160H633q-14 0-23.5-10.5T599-195q-6-95-43.5-177.5t-98-146.5q-60.5-64-141-105T143-676q-26-3-44.5-20.5T80-740q0-26 18.5-43t44.5-17h657q33 0 56.5 23.5T880-720v480Zm-560 80q-16 0-28-9.5T277-195q-11-63-56.5-107T112-357q-15-2-23.5-14.5T80-400q0-17 11-28.5t26-9.5q94 12 160.5 79T357-198q2 16-9 27t-28 11Zm160 0q-17 0-28.5-11T438-199q-14-128-104.5-217T115-518q-16-2-25.5-14T80-560q0-17 10.5-29t25.5-10q161 13 274 125t128 273q2 17-9.5 29T480-160Zm-350 0q-21 0-35.5-14.5T80-210q0-21 14.5-35.5T130-260q21 0 35.5 14.5T180-210q0 21-14.5 35.5T130-160Z");
a=W("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");a.classList.add("shaka-simple-overflow-button-label-inline");this.j=W("span");a.appendChild(this.j);this.i=W("span");this.i.classList.add("shaka-current-selection-span");a.appendChild(this.i);this.g.appendChild(a);this.parent.appendChild(this.g);YJ(this);ZJ(this);this.eventManager.o(this.localization,"locale-updated",function(){YJ(c)});this.eventManager.o(this.localization,"locale-changed",function(){YJ(c)});
this.eventManager.o(this.g,"click",function(){c.controls.Ca()&&$J(c)});this.eventManager.o(this.controls,"caststatuschanged",function(){ZJ(c)})}ma(XJ,hH);function $J(a){var b;Q(function(c){if(c.g==1){if(a.h.Qa())return a.h.bk(),c.B(0);sa(c,3);a.g.disabled=!0;return E(c,a.h.cast(),5)}if(c.g!=3)return a.g.disabled=!1,ua(c,0);b=va(c);a.g.disabled=!1;b.code!=8004&&a.controls.dispatchEvent(new T("error",(new Map).set("detail",b)));H(c)})}
function ZJ(a){var b=a.h.Mg()&&a.controls.sa,c=a.h.Qa();nH(a.g,b);a.l.use(c?"M720-600v240q0 17-11.5 28.5T680-320h-87q-8 0-14.5-4.5T569-337q-29-81-81.5-147T364-596q-16-10-11.5-27t21.5-17h306q17 0 28.5 11.5T720-600ZM320-160q-16 0-28-9.5T277-195q-11-63-56.5-107T112-357q-15-2-23.5-14.5T80-400q0-17 11-28.5t26-9.5q94 12 160.5 79T357-198q2 16-9 27t-28 11Zm160 0q-17 0-28.5-11T438-199q-14-128-104.5-217T115-518q-16-2-25.5-14T80-560q0-17 10.5-29t25.5-10q161 13 274 125.5T518-201q2 17-9.5 29T480-160Zm-340 0q-25 0-42.5-17.5T80-220q0-25 17.5-42.5T140-280q25 0 42.5 17.5T200-220q0 25-17.5 42.5T140-160Zm740-560v480q0 33-23.5 56.5T800-160H638q-17 0-28.5-11.5T598-200q0-17 11.5-28.5T638-240h162v-480H160v6q0 17-11.5 28.5T120-674q-17 0-28.5-11.5T80-714v-6q0-33 23.5-56.5T160-800h640q33 0 56.5 23.5T880-720Z":
"M880-240q0 33-23.5 56.5T800-160H633q-14 0-23.5-10.5T599-195q-6-95-43.5-177.5t-98-146.5q-60.5-64-141-105T143-676q-26-3-44.5-20.5T80-740q0-26 18.5-43t44.5-17h657q33 0 56.5 23.5T880-720v480Zm-560 80q-16 0-28-9.5T277-195q-11-63-56.5-107T112-357q-15-2-23.5-14.5T80-400q0-17 11-28.5t26-9.5q94 12 160.5 79T357-198q2 16-9 27t-28 11Zm160 0q-17 0-28.5-11T438-199q-14-128-104.5-217T115-518q-16-2-25.5-14T80-560q0-17 10.5-29t25.5-10q161 13 274 125t128 273q2 17-9.5 29T480-160Zm-350 0q-21 0-35.5-14.5T80-210q0-21 14.5-35.5T130-260q21 0 35.5 14.5T180-210q0 21-14.5 35.5T130-160Z");
b&&(a.g.ariaPressed=c?"true":"false");aK(a)}function aK(a){a.i.textContent=a.h.Qa()?a.h.$f():a.localization.resolve("OFF")}function YJ(a){a.g.ariaLabel=a.localization.resolve("CAST");a.j.textContent=a.localization.resolve("CAST");aK(a)}S("shaka.ui.CastButton",XJ);function bK(){}bK.prototype.create=function(a,b){return new XJ(a,b)};kJ("cast",new bK);FI("cast",new bK);function cK(a,b){OJ.call(this,a,b,"m400-200-182 91q-20 10-39-1.5T160-145v-495q0-33 23.5-56.5T240-720h320q33 0 56.5 23.5T640-640v495q0 23-19 34.5t-39 1.5l-182-91Zm360-40q-17 0-28.5-11.5T720-280v-520H320q-17 0-28.5-11.5T280-840q0-17 11.5-28.5T320-880h400q33 0 56.5 23.5T800-800v520q0 17-11.5 28.5T760-240Z");var c=this;this.button.classList.add("shaka-chapter-button");this.menu.classList.add("shaka-chapters");this.button.classList.add("shaka-tooltip-status");this.g=[];this.h="und";this.eventManager.o(this.localization,
"locale-updated",function(){dK(c);eK(c)});this.eventManager.o(this.localization,"locale-changed",function(){dK(c);eK(c)});this.eventManager.o(this.player,"unloading",function(){fK(c);c.h="und";c.g=[]});this.eventManager.o(this.player,"trackschanged",function(){eK(c)});dK(this);eK(this)}ma(cK,OJ);
function dK(a){a.backButton.ariaLabel=a.localization.resolve("BACK");a.button.ariaLabel=a.localization.resolve("CHAPTERS");a.nameSpan.textContent=a.localization.resolve("CHAPTERS");a.backSpan.textContent=a.localization.resolve("CHAPTERS")}function fK(a){var b=jH(a.menu);bk(a.menu);a.menu.appendChild(b);nH(a.button,!1)}
function eK(a){var b,c,d,e,f,g,h,k,l,m,n,q,r,t;Q(function(v){switch(v.g){case 1:b=function(w,z){return!w&&!z||w.id===z.id&&w.title===z.title&&w.startTime===z.startTime&&w.endTime===z.endTime},c="und",d=[],e=a.localization.g,f=u(Array.from(e)),g=f.next();case 2:if(g.done){v.B(4);break}c=h=g.value;if(!a.player){v.B(5);break}return E(v,a.player.qh(c),6);case 6:d=v.h||[];case 5:if(d.length){v.B(4);break}g=f.next();v.B(2);break;case 4:if(d.length){v.B(7);break}c="und";if(!a.player){v.B(7);break}return E(v,
a.player.qh(c),9);case 9:d=v.h||[];case 7:k=c!==a.h;l=a.g.length!==d.length||!a.g.some(function(w,z){z=d.at(z);return b(w,z)||d.some(function(y){return b(w,y)})});a.h=c;a.g=d;if(!d.length)fK(a);else if(k||l){m=u(a.g);n=m.next();for(q={};!n.done;q={Og:void 0},n=m.next())q.Og=n.value,r=Xj(),t=W("span"),t.classList.add("shaka-chapter"),t.textContent=q.Og.title,r.appendChild(t),a.eventManager.o(r,"click",function(w){return function(){a.controls.Ca()&&(a.video.currentTime=w.Og.startTime)}}(q)),a.menu.appendChild(r);
nH(a.button,!0);lH(a.menu)}H(v)}})}S("shaka.ui.ChapterSelection",cK);function gK(){}gK.prototype.create=function(a,b){return new cK(a,b)};kJ("chapter",new gK);FI("chapter",new gK);function hK(a,b){hH.call(this,a,b);var c=this;this.g=Xj();this.g.classList.add("shaka-fast-forward-button");this.g.classList.add("shaka-tooltip-status");this.g.setAttribute("shaka-status","1x");(new iH(this.g)).use("M100-315v-330q0-18 12-29t28-11q5 0 11 1t11 5l248 166q9 6 13.5 14.5T428-480q0 10-4.5 18.5T410-447L162-281q-5 4-11 5t-11 1q-16 0-28-11t-12-29Zm400 0v-330q0-18 12-29t28-11q5 0 11 1t11 5l248 166q9 6 13.5 14.5T828-480q0 10-4.5 18.5T810-447L562-281q-5 4-11 5t-11 1q-16 0-28-11t-12-29Z");this.parent.appendChild(this.g);
iK(this);this.h=this.controls.g.fastForwardRates;this.eventManager.o(this.localization,"locale-updated",function(){iK(c)});this.eventManager.o(this.localization,"locale-changed",function(){iK(c)});this.eventManager.o(this.g,"click",function(){if(c.controls.Ca()&&c.video.duration){var d=c.h.indexOf(c.player.Za())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.video.paused&&c.video.play();c.player.uc(d);c.g.setAttribute("shaka-status",d+"x")}});this.eventManager.o(this.player,"ratechange",function(){c.g.setAttribute("shaka-status",
c.player.Za()+"x")})}ma(hK,hH);function iK(a){a.g.ariaLabel=a.localization.resolve("FAST_FORWARD")}S("shaka.ui.FastForwardButton",hK);function jK(){}jK.prototype.create=function(a,b){return new hK(a,b)};FI("fast_forward",new jK);function kK(a,b){hH.call(this,a,b);var c=this;this.h=this.controls.u;this.g=Xj();this.g.classList.add("shaka-fullscreen-button");this.g.classList.add("shaka-tooltip");this.i=new iH(this.g,"M200-200h80q17 0 28.5 11.5T320-160q0 17-11.5 28.5T280-120H160q-17 0-28.5-11.5T120-160v-120q0-17 11.5-28.5T160-320q17 0 28.5 11.5T200-280v80Zm560 0v-80q0-17 11.5-28.5T800-320q17 0 28.5 11.5T840-280v120q0 17-11.5 28.5T800-120H680q-17 0-28.5-11.5T640-160q0-17 11.5-28.5T680-200h80ZM200-760v80q0 17-11.5 28.5T160-640q-17 0-28.5-11.5T120-680v-120q0-17 11.5-28.5T160-840h120q17 0 28.5 11.5T320-800q0 17-11.5 28.5T280-760h-80Zm560 0h-80q-17 0-28.5-11.5T640-800q0-17 11.5-28.5T680-840h120q17 0 28.5 11.5T840-800v120q0 17-11.5 28.5T800-640q-17 0-28.5-11.5T760-680v-80Z");
lK(this);this.parent.appendChild(this.g);mK(this);this.eventManager.o(this.localization,"locale-updated",function(){mK(c)});this.eventManager.o(this.localization,"locale-changed",function(){mK(c)});this.eventManager.o(this.g,"click",function(){return Q(function(d){return c.controls.Ca()?E(d,c.controls.qg(),0):d.return()})});this.eventManager.o(document,"fullscreenchange",function(){c.i.use(c.controls.yb()?"M240-240h-80q-17 0-28.5-11.5T120-280q0-17 11.5-28.5T160-320h120q17 0 28.5 11.5T320-280v120q0 17-11.5 28.5T280-120q-17 0-28.5-11.5T240-160v-80Zm480 0v80q0 17-11.5 28.5T680-120q-17 0-28.5-11.5T640-160v-120q0-17 11.5-28.5T680-320h120q17 0 28.5 11.5T840-280q0 17-11.5 28.5T800-240h-80ZM240-720v-80q0-17 11.5-28.5T280-840q17 0 28.5 11.5T320-800v120q0 17-11.5 28.5T280-640H160q-17 0-28.5-11.5T120-680q0-17 11.5-28.5T160-720h80Zm480 0h80q17 0 28.5 11.5T840-680q0 17-11.5 28.5T800-640H680q-17 0-28.5-11.5T640-680v-120q0-17 11.5-28.5T680-840q17 0 28.5 11.5T720-800v80Z":
"M200-200h80q17 0 28.5 11.5T320-160q0 17-11.5 28.5T280-120H160q-17 0-28.5-11.5T120-160v-120q0-17 11.5-28.5T160-320q17 0 28.5 11.5T200-280v80Zm560 0v-80q0-17 11.5-28.5T800-320q17 0 28.5 11.5T840-280v120q0 17-11.5 28.5T800-120H680q-17 0-28.5-11.5T640-160q0-17 11.5-28.5T680-200h80ZM200-760v80q0 17-11.5 28.5T160-640q-17 0-28.5-11.5T120-680v-120q0-17 11.5-28.5T160-840h120q17 0 28.5 11.5T320-800q0 17-11.5 28.5T280-760h-80Zm560 0h-80q-17 0-28.5-11.5T640-800q0-17 11.5-28.5T680-840h120q17 0 28.5 11.5T840-800v120q0 17-11.5 28.5T800-640q-17 0-28.5-11.5T760-680v-80Z");
mK(c)});this.eventManager.o(this.h,"loadedmetadata",function(){lK(c)});this.eventManager.o(this.h,"loadeddata",function(){lK(c)});this.eventManager.o(this.adManager,"ad-started",function(){lK(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){lK(c)})}ma(kK,hH);function lK(a){a.controls.xe()?a.g.classList.remove("shaka-hidden"):a.g.classList.add("shaka-hidden")}function mK(a){var b=a.controls.yb()?"EXIT_FULL_SCREEN":"FULL_SCREEN";a.g.ariaLabel=a.localization.resolve(b)}
S("shaka.ui.FullscreenButton",kK);function nK(){}nK.prototype.create=function(a,b){return new kK(a,b)};FI("fullscreen",new nK);function oK(a,b){hH.call(this,a,b);var c=this;this.g=Xj();this.g.classList.add("shaka-loop-button");this.g.classList.add("shaka-tooltip");this.m=new iH(this.g,"m274-200 34 34q12 12 11.5 28T308-110q-12 12-28.5 12.5T251-109L148-212q-6-6-8.5-13t-2.5-15q0-8 2.5-15t8.5-13l103-103q12-12 28.5-11.5T308-370q11 12 11.5 28T308-314l-34 34h406v-120q0-17 11.5-28.5T720-440q17 0 28.5 11.5T760-400v120q0 33-23.5 56.5T680-200H274Zm412-480H280v120q0 17-11.5 28.5T240-520q-17 0-28.5-11.5T200-560v-120q0-33 23.5-56.5T280-760h406l-34-34q-12-12-11.5-28t11.5-28q12-12 28.5-12.5T709-851l103 103q6 6 8.5 13t2.5 15q0 8-2.5 15t-8.5 13L709-589q-12 12-28.5 11.5T652-590q-11-12-11.5-28t11.5-28l34-34Z");
a=W("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");a.classList.add("shaka-simple-overflow-button-label-inline");this.j=W("span");this.j.textContent=this.localization.resolve("LOOP");a.appendChild(this.j);this.i=W("span");this.i.classList.add("shaka-current-selection-span");a.appendChild(this.i);this.g.appendChild(a);pK(this);this.parent.appendChild(this.g);this.eventManager.o(this.localization,"locale-updated",function(){pK(c)});this.eventManager.o(this.localization,
"locale-changed",function(){pK(c)});this.eventManager.o(this.g,"click",function(){c.controls.Ca()&&(c.video.loop=!c.video.loop,c.h.Ka(),c.h.xa(1))});this.l=this.video.loop;this.h=new Gf(function(){c.l!=c.video.loop&&(pK(c),c.l=c.video.loop)});this.h.xa(1);this.eventManager.o(this.player,"unloading",function(){qK(c)});this.eventManager.o(this.player,"loaded",function(){qK(c)});this.eventManager.o(this.player,"manifestupdated",function(){qK(c)});this.eventManager.o(this.video,"durationchange",function(){qK(c)})}
ma(oK,hH);oK.prototype.release=function(){this.h.stop();this.h=null;hH.prototype.release.call(this)};
function pK(a){a.j.textContent=a.localization.resolve("LOOP");a.i.textContent=a.localization.resolve(a.video.loop?"ON":"OFF");a.m.use(a.video.loop?"M120-40q-33 0-56.5-23.5T40-120v-720q0-33 23.5-56.5T120-920h720q33 0 56.5 23.5T920-840v720q0 33-23.5 56.5T840-40H120Zm154-160h406q33 0 56.5-23.5T760-280v-120q0-17-11.5-28.5T720-440q-17 0-28.5 11.5T680-400v120H274l34-34q12-12 11.5-28T308-370q-12-12-28.5-12.5T251-371L148-268q-6 6-8.5 13t-2.5 15q0 8 2.5 15t8.5 13l103 103q12 12 28.5 11.5T308-110q11-12 11.5-28T308-166l-34-34Zm412-480-34 34q-12 12-11.5 28t11.5 28q12 12 28.5 12.5T709-589l103-103q6-6 8.5-13t2.5-15q0-8-2.5-15t-8.5-13L709-851q-12-12-28.5-11.5T652-850q-11 12-11.5 28t11.5 28l34 34H280q-33 0-56.5 23.5T200-680v120q0 17 11.5 28.5T240-520q17 0 28.5-11.5T280-560v-120h406Z":"m274-200 34 34q12 12 11.5 28T308-110q-12 12-28.5 12.5T251-109L148-212q-6-6-8.5-13t-2.5-15q0-8 2.5-15t8.5-13l103-103q12-12 28.5-11.5T308-370q11 12 11.5 28T308-314l-34 34h406v-120q0-17 11.5-28.5T720-440q17 0 28.5 11.5T760-400v120q0 33-23.5 56.5T680-200H274Zm412-480H280v120q0 17-11.5 28.5T240-520q-17 0-28.5-11.5T200-560v-120q0-33 23.5-56.5T280-760h406l-34-34q-12-12-11.5-28t11.5-28q12-12 28.5-12.5T709-851l103 103q6 6 8.5 13t2.5 15q0 8-2.5 15t-8.5 13L709-589q-12 12-28.5 11.5T652-590q-11-12-11.5-28t11.5-28l34-34Z");
a.g.ariaLabel=a.localization.resolve(a.video.loop?"EXIT_LOOP_MODE":"ENTER_LOOP_MODE")}function qK(a){nH(a.g,!a.player.U())}S("shaka.ui.LoopButton",oK);function rK(){}rK.prototype.create=function(a,b){return new oK(a,b)};kJ("loop",new rK);FI("loop",new rK);sH("loop",new rK);function sK(a,b){hH.call(this,a,b);var c=this;this.g=Xj();this.g.classList.add("shaka-mute-button");this.g.classList.add("shaka-tooltip");this.j=new iH(this.g,"M760-481q0-83-44-151.5T598-735q-15-7-22-21.5t-2-29.5q6-16 21.5-23t31.5 0q97 43 155 131.5T840-481q0 108-58 196.5T627-153q-16 7-31.5 0T574-176q-5-15 2-29.5t22-21.5q74-34 118-102.5T760-481ZM280-360H160q-17 0-28.5-11.5T120-400v-160q0-17 11.5-28.5T160-600h120l132-132q19-19 43.5-8.5T480-703v446q0 27-24.5 37.5T412-228L280-360Zm380-120q0 42-19 79.5T591-339q-10 6-20.5.5T560-356v-250q0-12 10.5-17.5t20.5.5q31 25 50 63t19 80Z");
a=W("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.h=W("span");this.h.textContent=this.localization.resolve("MUTE");a.appendChild(this.h);this.i=W("span");this.i.classList.add("shaka-current-selection-span");a.appendChild(this.i);this.g.appendChild(a);this.parent.appendChild(this.g);tK(this);uK(this);this.eventManager.o(this.localization,"locale-updated",function(){tK(c)});this.eventManager.o(this.localization,"locale-changed",function(){tK(c)});
this.eventManager.o(this.g,"click",function(){c.controls.Ca()&&(c.ad&&c.ad.isLinear()?c.ad.setMuted(!c.ad.isMuted()):c.video.muted||c.video.volume!=0?c.video.muted=!c.video.muted:c.video.volume=1)});this.eventManager.o(this.video,"volumechange",function(){tK(c);uK(c)});this.eventManager.o(this.player,"loading",function(){tK(c);uK(c)});this.eventManager.o(this.player,"loaded",function(){vK(c)});this.eventManager.o(this.player,"unloading",function(){vK(c)});this.eventManager.o(this.player,"trackschanged",
function(){vK(c)});this.eventManager.o(this.controls,"caststatuschanged",function(){tK(c);uK(c)});this.eventManager.o(this.adManager,"ad-volume-changed",function(){tK(c);uK(c)});this.eventManager.o(this.adManager,"ad-muted",function(){tK(c);uK(c)});this.eventManager.o(this.adManager,"ad-started",function(){vK(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){c.ad=null;tK(c);uK(c);vK(c)});vK(this)}ma(sK,hH);
function tK(a){var b=a.ad?a.ad.isMuted()?"UNMUTE":"MUTE":a.video.muted||a.video.volume==0?"UNMUTE":"MUTE";a.g.ariaLabel=a.localization.resolve(b);a.h.textContent=a.localization.resolve(b)}
function uK(a){var b=a.ad?a.ad.isMuted()?"M671-177q-11 7-22 13t-23 11q-15 7-30.5 0T574-176q-6-15 1.5-29.5T598-227q4-2 7.5-4t7.5-4L480-368v111q0 27-24.5 37.5T412-228L280-360H160q-17 0-28.5-11.5T120-400v-160q0-17 11.5-28.5T160-600h88L84-764q-11-11-11-28t11-28q11-11 28-11t28 11l680 680q11 11 11 28t-11 28q-11 11-28 11t-28-11l-93-93Zm89-304q0-83-44-151.5T598-735q-15-7-22-21.5t-2-29.5q6-16 21.5-23t31.5 0q97 43 155 131t58 197q0 33-6 65.5T817-353q-8 22-24.5 27.5t-30.5.5q-14-5-22.5-18t-.5-30q11-26 16-52.5t5-55.5ZM591-623q33 21 51 63t18 80v10q0 5-1 10-2 13-14 17t-22-6l-51-51q-6-6-9-13.5t-3-15.5v-77q0-12 10.5-17.5t20.5.5Zm-201-59q-6-6-6-14t6-14l22-22q19-19 43.5-8.5T480-703v63q0 14-12 19t-22-5l-56-56Z":"M760-481q0-83-44-151.5T598-735q-15-7-22-21.5t-2-29.5q6-16 21.5-23t31.5 0q97 43 155 131.5T840-481q0 108-58 196.5T627-153q-16 7-31.5 0T574-176q-5-15 2-29.5t22-21.5q74-34 118-102.5T760-481ZM280-360H160q-17 0-28.5-11.5T120-400v-160q0-17 11.5-28.5T160-600h120l132-132q19-19 43.5-8.5T480-703v446q0 27-24.5 37.5T412-228L280-360Zm380-120q0 42-19 79.5T591-339q-10 6-20.5.5T560-356v-250q0-12 10.5-17.5t20.5.5q31 25 50 63t19 80Z":
a.video.muted||a.video.volume==0?"M671-177q-11 7-22 13t-23 11q-15 7-30.5 0T574-176q-6-15 1.5-29.5T598-227q4-2 7.5-4t7.5-4L480-368v111q0 27-24.5 37.5T412-228L280-360H160q-17 0-28.5-11.5T120-400v-160q0-17 11.5-28.5T160-600h88L84-764q-11-11-11-28t11-28q11-11 28-11t28 11l680 680q11 11 11 28t-11 28q-11 11-28 11t-28-11l-93-93Zm89-304q0-83-44-151.5T598-735q-15-7-22-21.5t-2-29.5q6-16 21.5-23t31.5 0q97 43 155 131t58 197q0 33-6 65.5T817-353q-8 22-24.5 27.5t-30.5.5q-14-5-22.5-18t-.5-30q11-26 16-52.5t5-55.5ZM591-623q33 21 51 63t18 80v10q0 5-1 10-2 13-14 17t-22-6l-51-51q-6-6-9-13.5t-3-15.5v-77q0-12 10.5-17.5t20.5.5Zm-201-59q-6-6-6-14t6-14l22-22q19-19 43.5-8.5T480-703v63q0 14-12 19t-22-5l-56-56Z":
"M760-481q0-83-44-151.5T598-735q-15-7-22-21.5t-2-29.5q6-16 21.5-23t31.5 0q97 43 155 131.5T840-481q0 108-58 196.5T627-153q-16 7-31.5 0T574-176q-5-15 2-29.5t22-21.5q74-34 118-102.5T760-481ZM280-360H160q-17 0-28.5-11.5T120-400v-160q0-17 11.5-28.5T160-600h120l132-132q19-19 43.5-8.5T480-703v446q0 27-24.5 37.5T412-228L280-360Zm380-120q0 42-19 79.5T591-339q-10 6-20.5.5T560-356v-250q0-12 10.5-17.5t20.5.5q31 25 50 63t19 80Z";a.j.use(b)}
function vK(a){var b=!0;a.ad&&a.ad.isLinear()?b=!0:a.player.Hf()&&(b=!1);nH(a.g,b)}S("shaka.ui.MuteButton",sK);function wK(){}wK.prototype.create=function(a,b){return new sK(a,b)};kJ("mute",new wK);FI("mute",new wK);sH("mute",new wK);function xK(a,b){hH.call(this,a,b);var c=this;this.j=this.controls.u;this.g=Xj();this.g.classList.add("shaka-pip-button");this.g.classList.add("shaka-tooltip");this.l=new iH(this.g,"M120-520q-17 0-28.5-11.5T80-560q0-17 11.5-28.5T120-600h104L80-743q-12-12-12-28.5T80-800q12-12 28.5-12t28.5 12l143 144v-104q0-17 11.5-28.5T320-800q17 0 28.5 11.5T360-760v200q0 17-11.5 28.5T320-520H120Zm40 360q-33 0-56.5-23.5T80-240v-160q0-17 11.5-28.5T120-440q17 0 28.5 11.5T160-400v160h280q17 0 28.5 11.5T480-200q0 17-11.5 28.5T440-160H160Zm680-280q-17 0-28.5-11.5T800-480v-240H480q-17 0-28.5-11.5T440-760q0-17 11.5-28.5T480-800h320q33 0 56.5 23.5T880-720v240q0 17-11.5 28.5T840-440ZM600-160q-17 0-28.5-11.5T560-200v-120q0-17 11.5-28.5T600-360h240q17 0 28.5 11.5T880-320v120q0 17-11.5 28.5T840-160H600Z");
a=W("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");a.classList.add("shaka-simple-overflow-button-label-inline");this.i=W("span");this.i.textContent=this.localization.resolve("PICTURE_IN_PICTURE");a.appendChild(this.i);this.h=W("span");this.h.classList.add("shaka-current-selection-span");a.appendChild(this.h);this.g.appendChild(a);yK(this);this.parent.appendChild(this.g);this.controls.Gf()||nH(this.g,!1);this.eventManager.o(this.localization,"locale-updated",
function(){yK(c)});this.eventManager.o(this.localization,"locale-changed",function(){yK(c)});this.eventManager.o(this.g,"click",function(){c.controls.Ca()&&c.controls.ed()});this.eventManager.o(this.j,"enterpictureinpicture",function(){zK(c)});this.eventManager.o(this.j,"leavepictureinpicture",function(){AK(c)});this.eventManager.o(this.controls,"caststatuschanged",function(){BK(c)});this.eventManager.o(this.player,"trackschanged",function(){BK(c)});"documentPictureInPicture"in window&&this.eventManager.o(window.documentPictureInPicture,
"enter",function(d){zK(c);c.eventManager.ua(d.window,"pagehide",function(){AK(c)})})}ma(xK,hH);
function zK(a){a.l.use("M160-160q-33 0-56.5-23.5T80-240v-240q0-17 11.5-28.5T120-520q17 0 28.5 11.5T160-480v240h640v-480H480q-17 0-28.5-11.5T440-760q0-17 11.5-28.5T480-800h320q33 0 56.5 23.5T880-720v480q0 33-23.5 56.5T800-160H160Zm400-263 95 95q12 12 28 12t28-12q12-12 12-28.5T711-385l-95-95h64q17 0 28.5-11.5T720-520q0-17-11.5-28.5T680-560H520q-17 0-28.5 11.5T480-520v160q0 17 11.5 28.5T520-320q17 0 28.5-11.5T560-360v-63ZM120-600q-17 0-28.5-11.5T80-640v-120q0-17 11.5-28.5T120-800h200q17 0 28.5 11.5T360-760v120q0 17-11.5 28.5T320-600H120Zm360 120Z");a.g.ariaLabel=
a.localization.resolve("EXIT_PICTURE_IN_PICTURE");a.h.textContent=a.localization.resolve("ON")}
function AK(a){a.l.use("M120-520q-17 0-28.5-11.5T80-560q0-17 11.5-28.5T120-600h104L80-743q-12-12-12-28.5T80-800q12-12 28.5-12t28.5 12l143 144v-104q0-17 11.5-28.5T320-800q17 0 28.5 11.5T360-760v200q0 17-11.5 28.5T320-520H120Zm40 360q-33 0-56.5-23.5T80-240v-160q0-17 11.5-28.5T120-440q17 0 28.5 11.5T160-400v160h280q17 0 28.5 11.5T480-200q0 17-11.5 28.5T440-160H160Zm680-280q-17 0-28.5-11.5T800-480v-240H480q-17 0-28.5-11.5T440-760q0-17 11.5-28.5T480-800h320q33 0 56.5 23.5T880-720v240q0 17-11.5 28.5T840-440ZM600-160q-17 0-28.5-11.5T560-200v-120q0-17 11.5-28.5T600-360h240q17 0 28.5 11.5T880-320v120q0 17-11.5 28.5T840-160H600Z");a.g.ariaLabel=
a.localization.resolve("ENTER_PICTURE_IN_PICTURE");a.h.textContent=a.localization.resolve("OFF")}function yK(a){a.i.textContent=a.localization.resolve("PICTURE_IN_PICTURE");var b=a.controls.Nd();a.g.ariaLabel=a.localization.resolve(b?"EXIT_PICTURE_IN_PICTURE":"ENTER_PICTURE_IN_PICTURE");a.h.textContent=a.localization.resolve(b?"ON":"OFF")}
function BK(a){Q(function(b){if(!a.controls.Gf())return nH(a.g,!1),a.controls.Nd()?E(b,a.controls.ed(),0):b.B(0);if(!a.player||!a.player.Md())return nH(a.g,!0),b.B(0);nH(a.g,!1);return a.controls.Nd()?E(b,a.controls.ed(),0):b.B(0)})}S("shaka.ui.PipButton",xK);function CK(){}CK.prototype.create=function(a,b){return new xK(a,b)};kJ("picture_in_picture",new CK);FI("picture_in_picture",new CK);sH("picture_in_picture",new CK);function DK(a,b){OJ.call(this,a,b,"m426-330 195-125q14-9 14-25t-14-25L426-630q-15-10-30.5-1.5T380-605v250q0 18 15.5 26.5T426-330ZM121-440q17 0 30.5 11t18.5 28q6 23 14.5 43.5T204-317q9 15 7.5 32T198-256q-11 11-27 10t-25-14q-22-31-37-66.5T86-400q-3-16 7.5-28t27.5-12Zm77-264q12 12 13 29t-7 31q-11 20-19.5 41T170-559q-5 17-18.5 28T121-520q-17 0-27.5-12.5T87-561q8-38 23-73.5t36-66.5q9-13 25-13.5t27 10.5Zm56 505q12-13 29.5-14t32.5 8q20 11 40.5 20t42.5 15q17 5 28 18t11 30q0 17-12.5 27T397-88q-38-8-71.5-23T260-146q-14-9-15.5-25t9.5-28Zm186-639q0 17-10.5 30T402-790q-23 6-44 14.5T317-755q-15 9-32.5 7.5T255-761q-12-12-10.5-28.5T260-815q32-20 66.5-34.5T399-872q16-3 28.5 7t12.5 27Zm360 358q0-113-69.5-199.5T553-792q-15-4-24-17t-9-29q0-16 11-26.5t25-7.5q140 28 232 137t92 255q0 146-92 255T556-88q-14 3-25-7.5T520-122q0-16 9-29t24-17q108-26 177.5-112.5T800-480Z");
var c=this;this.button.classList.add("shaka-playbackrate-button");this.menu.classList.add("shaka-playback-rates");this.button.classList.add("shaka-tooltip-status");Array.from(a.classList).includes("shaka-overflow-menu")||(this.g=W("span"),this.g.classList.add("shaka-overflow-playback-rate-mark"),this.button.appendChild(this.g));this.eventManager.o(this.localization,"locale-updated",function(){EK(c)});this.eventManager.o(this.localization,"locale-changed",function(){EK(c)});this.eventManager.o(this.player,
"loaded",function(){FK(c)});this.eventManager.o(this.player,"ratechange",function(){FK(c)});EK(this);GK(this);FK(this)}ma(DK,OJ);function EK(a){a.backButton.ariaLabel=a.localization.resolve("BACK");a.button.ariaLabel=a.localization.resolve("PLAYBACK_RATE");a.nameSpan.textContent=a.localization.resolve("PLAYBACK_RATE");a.backSpan.textContent=a.localization.resolve("PLAYBACK_RATE")}
function FK(a){var b=a.player.Za(),c=kH(a.menu,"material-svg-icon shaka-chosen-item");if(c){var d=c.parentElement;d.removeAttribute("aria-selected");var e=d.getElementsByTagName("span")[0];e&&e.classList.remove("shaka-chosen-item");d.removeChild(c)}if(c=Array.from(a.menu.querySelectorAll("span")).find(function(f){return f.textContent==b+"x"}))d=c.parentElement,d.appendChild(mH()),d.ariaSelected="true",c.classList.add("shaka-chosen-item");a.currentSelection.textContent=b+"x";a.button.setAttribute("shaka-status",
b+"x");a.g&&(a.g.textContent=b+"x")}function GK(a){for(var b=u(a.controls.g.playbackRates),c=b.next(),d={};!c.done;d={Zf:void 0},c=b.next()){d.Zf=c.value;c=Xj();var e=W("span");e.textContent=d.Zf+"x";c.appendChild(e);a.eventManager.o(c,"click",function(f){return function(){f.Zf==a.video.defaultPlaybackRate?a.player.Cd():a.player.uc(f.Zf,!1)}}(d));a.menu.appendChild(c)}lH(a.menu)}S("shaka.ui.PlaybackRateSelection",DK);function HK(){}HK.prototype.create=function(a,b){return new DK(a,b)};
kJ("playback_rate",new HK);FI("playback_rate",new HK);function IK(a,b){hH.call(this,a,b);var c=this;this.g=Xj();this.g.classList.add("shaka-current-time");JK(this,"0:00");this.parent.appendChild(this.g);this.eventManager.o(this.g,"click",function(){c.controls.Ca()&&c.player.U()&&(c.video.currentTime=c.player.wa().end)});this.eventManager.o(this.player,"loading",function(){nH(c.g,!0)});this.eventManager.o(this.controls,"timeandseekrangeupdated",function(){var d=c.controls.V,e=c.controls.rh(),f=c.player.wa(),g=f.end-f.start;isFinite(g)?c.player.U()?(e=
Math.max(0,Math.floor(f.end-e)),g=g>=3600,e>=1||d?(JK(c,"- "+oH(e,g)),c.g.disabled=!1):(JK(c,c.localization.resolve("LIVE")),c.g.disabled=!0)):(d=g>=3600,e=oH(Math.max(0,e-f.start),d),g&&(e+=" / "+oH(g,d)),JK(c,e),c.g.disabled=!0):(JK(c,c.localization.resolve("LIVE")),c.g.disabled=!0)});this.eventManager.o(this.player,"trackschanged",function(){c.player.U()&&(c.g.ariaLabel=c.localization.resolve("SKIP_TO_LIVE"))});this.eventManager.o(this.adManager,"ad-started",function(){nH(c.g,!c.ad.isLinear())});
this.eventManager.o(this.adManager,"ad-stopped",function(){nH(c.g,!0)})}ma(IK,hH);function JK(a,b){b!=a.g.textContent&&(a.g.textContent=b)}S("shaka.ui.PresentationTimeTracker",IK);function KK(){}KK.prototype.create=function(a,b){return new IK(a,b)};FI("time_and_duration",new KK);function LK(a,b){hH.call(this,a,b);var c=this;this.g=Xj();this.g.classList.add("shaka-recenter-vr-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";new iH(this.g,"M479-359q-50 0-85-35t-35-85q0-50 35-85t85-35q50 0 85 35t35 85q0 50-35 85t-85 35Zm-57 222-85-85q-12-12-11.5-28.5T338-279q12-12 28.5-12t28.5 12l85 86 85-85q11-11 28-11t28 11q11 11 11 28t-11 28l-85 85q-12 12-27 18t-30 6q-15 0-30-6t-27-18ZM221-337l-85-85q-12-12-18-27t-6-30q0-15 6-30t18-27l85-85q12-12 28.5-12t28.5 12q12 12 12 28.5T278-564l-86 86 85 85q11 11 11 28t-11 28q-11 11-28 11t-28-11Zm116-401 85-85q12-12 27-18t30-6q15 0 30 6t27 18l85 85q12 12 12 28t-12 28q-12 12-28.5 12T564-682l-86-85-85 85q-11 11-28 11t-28-11q-11-11-11-28t11-28Zm344 343 85-85-85-85q-11-11-11-28t11-28q11-11 28-11t28 11l85 85q12 12 18 27t6 30q0 15-6 30t-18 27l-85 85q-12 12-28 11.5T681-338q-12-12-12-28.5t12-28.5Z");
a=W("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.i=W("span");a.appendChild(this.i);this.h=W("span");this.h.classList.add("shaka-current-selection-span");a.appendChild(this.h);this.g.appendChild(a);this.parent.appendChild(this.g);MK(this);this.eventManager.o(this.localization,"locale-updated",function(){MK(c)});this.eventManager.o(this.localization,"locale-changed",function(){MK(c)});var d=this.controls.D;this.eventManager.o(this.g,"click",
function(){c.controls.Ca()&&(d.g?lI(d.g):bb("Not playing VR content"))});this.eventManager.o(d,"vrstatuschanged",function(){nH(c.g,c.controls.Zb())});nH(this.g,this.controls.Zb())}ma(LK,hH);function MK(a){a.g.ariaLabel=a.localization.resolve("RECENTER_VR");a.i.textContent=a.localization.resolve("RECENTER_VR")}S("shaka.ui.RecenterVRButton",LK);function NK(){}NK.prototype.create=function(a,b){return new LK(a,b)};kJ("recenter_vr",new NK);FI("recenter_vr",new NK);function OK(a,b){hH.call(this,a,b);var c=this;this.i=Tb().mg();this.g=Xj();this.g.classList.add("shaka-remote-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.l=new iH(this.g,this.i?"M80-280v-480q0-33 23.5-56.5T160-840h640q33 0 56.5 23.5T880-760v480q0 33-23.5 56.5T800-200h-80q-17 0-28.5-11.5T680-240q0-17 11.5-28.5T720-280h80v-480H160v480h80q17 0 28.5 11.5T280-240q0 17-11.5 28.5T240-200h-80q-33 0-56.5-23.5T80-280Zm232 160q-14 0-22-9.5t-8-20.5q0-5 2-10.5t7-10.5l161-161q6-6 13-9t15-3q8 0 15 3t13 9l161 161q5 5 7 10.5t2 10.5q0 11-8 20.5t-22 9.5H312Zm168-360Z":
"M880-240q0 33-23.5 56.5T800-160H633q-14 0-23.5-10.5T599-195q-6-95-43.5-177.5t-98-146.5q-60.5-64-141-105T143-676q-26-3-44.5-20.5T80-740q0-26 18.5-43t44.5-17h657q33 0 56.5 23.5T880-720v480Zm-560 80q-16 0-28-9.5T277-195q-11-63-56.5-107T112-357q-15-2-23.5-14.5T80-400q0-17 11-28.5t26-9.5q94 12 160.5 79T357-198q2 16-9 27t-28 11Zm160 0q-17 0-28.5-11T438-199q-14-128-104.5-217T115-518q-16-2-25.5-14T80-560q0-17 10.5-29t25.5-10q161 13 274 125t128 273q2 17-9.5 29T480-160Zm-350 0q-21 0-35.5-14.5T80-210q0-21 14.5-35.5T130-260q21 0 35.5 14.5T180-210q0 21-14.5 35.5T130-160Z");
a=W("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.m=W("span");a.appendChild(this.m);this.j=W("span");this.j.classList.add("shaka-current-selection-span");a.appendChild(this.j);this.g.appendChild(a);this.parent.appendChild(this.g);this.h=-1;PK(this);nH(this.g,!1);this.video.remote?(this.eventManager.o(this.localization,"locale-updated",function(){PK(c)}),this.eventManager.o(this.localization,"locale-changed",function(){PK(c)}),this.eventManager.o(this.controls,
"caststatuschanged",function(){QK(c)}),this.eventManager.o(this.g,"click",function(){c.controls.Ca()&&c.video.remote.prompt().catch(function(){})}),this.eventManager.o(this.video.remote,"connect",function(){QK(c);RK(c)}),this.eventManager.o(this.video.remote,"connecting",function(){QK(c);RK(c)}),this.eventManager.o(this.video.remote,"disconnect",function(){QK(c);RK(c)}),this.eventManager.o(this.player,"loaded",function(){QK(c)}),QK(this,!0),RK(this)):this.g.classList.add("shaka-hidden")}ma(OK,hH);
OK.prototype.release=function(){this.video.remote&&this.h!=-1&&this.video.remote.cancelWatchAvailability(this.h).catch(function(){});hH.prototype.release.call(this)};
function QK(a,b){b=b===void 0?!1:b;var c,d;Q(function(e){switch(e.g){case 1:if(a.controls.F.Mg()&&a.controls.sa||!a.video.remote){nH(a.g,!1);a.h!=-1&&(a.video.remote.cancelWatchAvailability(a.h),a.h=-1);e.B(0);break}if(a.video.remote.state=="disconnected"||b){c=function(f){if(a.player){var g=a.video.disableRemotePlayback,h=!0;Tb().mg()&&a.player.l==Pr&&a.player.wh()!="HLS"&&(h=!1);nH(a.g,h&&f&&!g)}else nH(a.g,!1)};sa(e,7);if(a.h==-1){e.B(9);break}return E(e,a.video.remote.cancelWatchAvailability(a.h),
10)}nH(a.g,!0);if(a.h==-1){e.B(0);break}return E(e,a.video.remote.cancelWatchAvailability(a.h),6);case 6:a.h=-1;e.B(0);break;case 10:a.h=-1;case 9:ua(e,8);break;case 7:va(e);case 8:return sa(e,11),E(e,a.video.remote.watchAvailability(c),13);case 13:d=e.h;a.h=d;ua(e,0);break;case 11:va(e),c(!0),H(e)}})}function PK(a){var b=a.i?a.localization.resolve("AIRPLAY"):a.localization.resolve("CAST");a.g.ariaLabel=b;a.m.textContent=b}
function RK(a){a.i||(a.video.remote.state=="disconnected"?a.l.use("M880-240q0 33-23.5 56.5T800-160H633q-14 0-23.5-10.5T599-195q-6-95-43.5-177.5t-98-146.5q-60.5-64-141-105T143-676q-26-3-44.5-20.5T80-740q0-26 18.5-43t44.5-17h657q33 0 56.5 23.5T880-720v480Zm-560 80q-16 0-28-9.5T277-195q-11-63-56.5-107T112-357q-15-2-23.5-14.5T80-400q0-17 11-28.5t26-9.5q94 12 160.5 79T357-198q2 16-9 27t-28 11Zm160 0q-17 0-28.5-11T438-199q-14-128-104.5-217T115-518q-16-2-25.5-14T80-560q0-17 10.5-29t25.5-10q161 13 274 125t128 273q2 17-9.5 29T480-160Zm-350 0q-21 0-35.5-14.5T80-210q0-21 14.5-35.5T130-260q21 0 35.5 14.5T180-210q0 21-14.5 35.5T130-160Z"):a.l.use("M720-600v240q0 17-11.5 28.5T680-320h-87q-8 0-14.5-4.5T569-337q-29-81-81.5-147T364-596q-16-10-11.5-27t21.5-17h306q17 0 28.5 11.5T720-600ZM320-160q-16 0-28-9.5T277-195q-11-63-56.5-107T112-357q-15-2-23.5-14.5T80-400q0-17 11-28.5t26-9.5q94 12 160.5 79T357-198q2 16-9 27t-28 11Zm160 0q-17 0-28.5-11T438-199q-14-128-104.5-217T115-518q-16-2-25.5-14T80-560q0-17 10.5-29t25.5-10q161 13 274 125.5T518-201q2 17-9.5 29T480-160Zm-340 0q-25 0-42.5-17.5T80-220q0-25 17.5-42.5T140-280q25 0 42.5 17.5T200-220q0 25-17.5 42.5T140-160Zm740-560v480q0 33-23.5 56.5T800-160H638q-17 0-28.5-11.5T598-200q0-17 11.5-28.5T638-240h162v-480H160v6q0 17-11.5 28.5T120-674q-17 0-28.5-11.5T80-714v-6q0-33 23.5-56.5T160-800h640q33 0 56.5 23.5T880-720Z"))}
S("shaka.ui.RemoteButton",OK);function SK(){}SK.prototype.create=function(a,b){return new OK(a,b)};kJ("remote",new SK);FI("remote",new SK);function TK(a,b){OJ.call(this,a,b,"M480-120q-17 0-28.5-11.5T440-160v-160q0-17 11.5-28.5T480-360q17 0 28.5 11.5T520-320v40h280q17 0 28.5 11.5T840-240q0 17-11.5 28.5T800-200H520v40q0 17-11.5 28.5T480-120Zm-320-80q-17 0-28.5-11.5T120-240q0-17 11.5-28.5T160-280h160q17 0 28.5 11.5T360-240q0 17-11.5 28.5T320-200H160Zm160-160q-17 0-28.5-11.5T280-400v-40H160q-17 0-28.5-11.5T120-480q0-17 11.5-28.5T160-520h120v-40q0-17 11.5-28.5T320-600q17 0 28.5 11.5T360-560v160q0 17-11.5 28.5T320-360Zm160-80q-17 0-28.5-11.5T440-480q0-17 11.5-28.5T480-520h320q17 0 28.5 11.5T840-480q0 17-11.5 28.5T800-440H480Zm160-160q-17 0-28.5-11.5T600-640v-160q0-17 11.5-28.5T640-840q17 0 28.5 11.5T680-800v40h120q17 0 28.5 11.5T840-720q0 17-11.5 28.5T800-680H680v40q0 17-11.5 28.5T640-600Zm-480-80q-17 0-28.5-11.5T120-720q0-17 11.5-28.5T160-760h320q17 0 28.5 11.5T520-720q0 17-11.5 28.5T480-680H160Z");
var c=this;this.button.classList.add("shaka-resolution-button");this.button.classList.add("shaka-tooltip-status");this.menu.classList.add("shaka-resolutions");this.h=W("span");this.h.classList.add("shaka-current-auto-quality");this.h.style.display="none";this.i=W("sup");this.i.classList.add("shaka-current-quality-mark");this.i.style.display="none";Array.from(a.classList).includes("shaka-overflow-menu")?this.parent.parentElement&&(this.g=ak(this.parent.parentElement)):(this.g=W("span"),this.g.classList.add("shaka-overflow-playback-rate-mark"),
this.button.appendChild(this.g));a=W("span");this.button.childNodes[1].appendChild(a);a.appendChild(this.currentSelection);a.appendChild(this.h);a.appendChild(this.i);this.eventManager.o(this.localization,"locale-updated",function(){UK(c)});this.eventManager.o(this.localization,"locale-changed",function(){UK(c)});this.eventManager.o(this.player,"loading",function(){VK(c);WK(c)});this.eventManager.o(this.player,"loaded",function(){VK(c);WK(c)});this.eventManager.o(this.player,"unloading",function(){VK(c);
WK(c)});this.eventManager.o(this.player,"variantchanged",function(){VK(c);WK(c)});this.eventManager.o(this.player,"trackschanged",function(){VK(c);WK(c)});this.eventManager.o(this.player,"abrstatuschanged",function(){VK(c);WK(c)});this.eventManager.o(this.player,"adaptation",function(){VK(c);WK(c)});VK(this)}ma(TK,OJ);
function WK(a){var b=a.player.getConfiguration().abr.enabled;if(a.player.Md()){a.i.textContent="";a.i.style.display="none";a.g&&(a.g.textContent="",a.g.style.display="none");var c=a.player.Qb()||[],d=c.find(function(e){return e.active});d&&(b?(a.h.textContent=d.bandwidth?fL(a,d,c):"Unknown",a.h.style.display=""):a.h.style.display="none")}else c=a.player.getVideoTracks()||[],(d=c.find(function(e){return e.active}))?(b?(a.h.textContent=d.height&&d.width?gL(a,d,c):d.bandwidth?hL(d.bandwidth):"Unknown",
a.h.style.display=""):a.h.style.display="none",b=iL(a,d.width,d.height),a.i.textContent=b,a.i.style.display=b!==""?"":"none",a.g&&(a.g.textContent=b,a.g.style.display=b!==""?"":"none")):a.g&&(b=a.player.getStats(),b=iL(a,b.width,b.height),a.g.textContent=b,a.g.style.display=b!==""?"":"none")}
function iL(a,b,c){if(!b||!c)return"";c>b&&(c=u([c,b]),b=c.next().value,c=c.next().value);b/c>16/9&&(c=Math.round(b*9/16));a=a.controls.g.qualityMarks;return c>=8640?c+"p":c>=4320?a["4320"]:c>=2160?a["2160"]:c>=1440?a["1440"]:c>=1080?a["1080"]:c>=720?a["720"]:""}
function VK(a){var b=jH(a.menu);bk(a.menu);a.menu.appendChild(b);b=0;b=a.player.Md()?jL(a):kL(a);var c=Xj();c.classList.add("shaka-enable-abr-button");a.eventManager.o(c,"click",function(){a.player.configure({abr:{enabled:!0}});VK(a)});a.l=W("span");a.l.textContent=a.localization.resolve("AUTO_QUALITY");c.appendChild(a.l);a.player.getConfiguration().abr.enabled&&(c.ariaSelected="true",c.appendChild(mH()),a.l.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("AUTO_QUALITY"));
a.button.setAttribute("shaka-status",a.currentSelection.textContent);a.menu.appendChild(c);lH(a.menu);a.controls.dispatchEvent(new T("resolutionselectionupdated"));UK(a);nH(a.button,b>0)}
function jL(a){var b=[];a.player.l==Tr||a.player.Da()||(b=a.player.Qb()||[]);var c=b.find(function(k){return k.active});c&&(b=b.filter(function(k){if(k.language!=c.language||a.controls.g.showAudioChannelCountVariants&&k.channelsCount&&c.channelsCount&&k.channelsCount!=c.channelsCount)return!1;var l=a.controls.g.trackLabelFormat;return(l==1||l==2)&&JSON.stringify(k.audioRoles)!=JSON.stringify(c.audioRoles)||l==3&&k.label!=c.label||!k.bandwidth?!1:!0}));b=b.filter(function(k,l){return b.findIndex(function(m){return m.bandwidth==
k.bandwidth})==l});b.sort(function(k,l){return l.bandwidth-k.bandwidth});for(var d=a.player.getConfiguration().abr.enabled,e=u(b),f=e.next(),g={};!f.done;g={Ne:void 0},f=e.next()){g.Ne=f.value;f=Xj();f.classList.add("explicit-resolution");a.eventManager.o(f,"click",function(k){return function(){var l=k.Ne;a.player.configure({abr:{enabled:!1}});a.player.Je(l,a.controls.g.clearBufferOnQualityChange)}}(g));var h=W("span");h.textContent=g.Ne.bandwidth?fL(a,g.Ne,b):"Unknown";f.appendChild(h);d||g.Ne!=
c||(f.ariaSelected="true",f.appendChild(mH()),h.classList.add("shaka-chosen-item"),a.currentSelection.textContent=h.textContent);a.menu.appendChild(f)}return b.length}
function kL(a){var b=a.player.getVideoTracks()||[],c=b.find(function(m){return m.active});b=b.filter(function(m,n){return b.findIndex(function(q){var r=q.height==m.height&&q.bandwidth==m.bandwidth&&q.frameRate==m.frameRate&&q.hdr==m.hdr&&q.videoLayout==m.videoLayout&&Vc(q.roles,m.roles);r&&a.controls.g.showVideoCodec&&q.codecs&&m.codecs&&(r=mf(q.codecs)==mf(m.codecs));return r})==n});b.sort(function(m,n){return n.height==m.height||m.height==null||n.height==null?n.bandwidth-m.bandwidth:n.height-m.height});
for(var d=a.player.getConfiguration().abr.enabled,e=u(b),f=e.next(),g={};!f.done;g={sc:void 0},f=e.next()){g.sc=f.value;f=Xj();f.classList.add("explicit-resolution");a.eventManager.o(f,"click",function(m){return function(){var n=m.sc;a.player.configure({abr:{enabled:!1}});a.player.Oj(n,a.controls.g.clearBufferOnQualityChange)}}(g));var h=W("span");h.textContent=g.sc.height&&g.sc.width?gL(a,g.sc,b):g.sc.bandwidth?hL(g.sc.bandwidth):"Unknown";f.appendChild(h);var k=iL(a,g.sc.width,g.sc.height);if(k!==
""){var l=W("sup");l.classList.add("shaka-quality-mark");l.textContent=k;f.appendChild(l)}d||g.sc!=c||(f.ariaSelected="true",f.appendChild(mH()),h.classList.add("shaka-chosen-item"),a.currentSelection.textContent=h.textContent);a.menu.appendChild(f)}return b.length}
function gL(a,b,c){function d(n,q){return n!=q&&n.height==q.height&&n.hdr==q.hdr&&f(n)==f(q)&&e(n)==e(q)&&Math.round(n.frameRate||0)==Math.round(q.frameRate||0)}function e(n){return n.codecs?mf(n.codecs).startsWith("lcevc"):!1}function f(n){return n.codecs?mf(n.codecs).startsWith("dovi-"):!1}var g=b.height||0,h=b.width||0;g>h&&(g=u([g,h]),h=g.next().value,g=g.next().value);var k=g;h/g>16/9&&(k=Math.round(h*9/16));h=k+"p";g=new Set;k=u(c);for(var l=k.next();!l.done;l=k.next())l=l.value,l.frameRate&&
g.add(Math.round(l.frameRate));g.size>1&&(g=b.frameRate)&&(g>=50||g<=20)&&(h+=Math.round(b.frameRate));if(b.hdr=="PQ"||b.hdr=="HLG")h=f(b)?h+" Dolby Vision":h+" HDR";e(b)&&(h+=" LCEVC");(b.videoLayout||"").includes("CH-STEREO")&&(h+=" 3D");if(c.some(function(n){return d(b,n)})&&(c.some(function(n){return d(b,n)&&n.bandwidth==b.bandwidth})||(h+=" ("+hL(b.bandwidth)+")"),a.controls.g.showVideoCodec)){var m=function(n){var q="";n&&(q=mf(n).toUpperCase());return q?" "+q:q};c.some(function(n){return d(b,
n)&&m(n.codecs)!=m(b.codecs)})&&(h+=m(b.codecs))}return h}function fL(a,b,c){var d=hL(b.bandwidth);if(a.controls.g.showAudioCodec){var e=function(f){var g="";f&&(g=mf(f).toUpperCase());return g?" "+g:g};c.some(function(f){return e(f.codecs)!=e(b.codecs)})&&(d+=e(b.codecs))}return d}function hL(a){return a>=1E6?(a/1E6).toFixed(1).replace(".0","")+" Mbps":Math.floor(a/1E3)+" Kbps"}
function UK(a){var b=a.player.Md()?"QUALITY":"RESOLUTION";a.button.ariaLabel=a.localization.resolve(b);a.backButton.ariaLabel=a.localization.resolve(b);a.backSpan.textContent=a.localization.resolve(b);a.nameSpan.textContent=a.localization.resolve(b);a.l.textContent=a.localization.resolve("AUTO_QUALITY");a.player.getConfiguration().abr.enabled&&(a.currentSelection.textContent=a.localization.resolve("AUTO_QUALITY"))}S("shaka.ui.ResolutionSelection",TK);function lL(){}
lL.prototype.create=function(a,b){return new TK(a,b)};kJ("quality",new lL);FI("quality",new lL);function mL(a,b){hH.call(this,a,b);var c=this;this.g=Xj();this.g.classList.add("shaka-rewind-button");this.g.classList.add("shaka-tooltip-status");this.g.setAttribute("shaka-status",this.localization.resolve("OFF"));(new iH(this.g)).use("M798-281 550-447q-9-6-13.5-14.5T532-480q0-10 4.5-18.5T550-513l248-166q5-4 11-5t11-1q16 0 28 11t12 29v330q0 18-12 29t-28 11q-5 0-11-1t-11-5Zm-400 0L150-447q-9-6-13.5-14.5T132-480q0-10 4.5-18.5T150-513l248-166q5-4 11-5t11-1q16 0 28 11t12 29v330q0 18-12 29t-28 11q-5 0-11-1t-11-5Z");
this.parent.appendChild(this.g);nL(this);this.h=this.controls.g.rewindRates;this.eventManager.o(this.localization,"locale-updated",function(){nL(c)});this.eventManager.o(this.localization,"locale-changed",function(){nL(c)});this.eventManager.o(this.g,"click",function(){if(c.controls.Ca()&&c.video.duration){var d=c.h.indexOf(c.player.Za())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.video.paused&&c.video.play();c.player.uc(d);c.g.setAttribute("shaka-status",d+"x")}});this.eventManager.o(this.player,"ratechange",
function(){c.g.setAttribute("shaka-status",c.player.Za()+"x")})}ma(mL,hH);function nL(a){a.g.ariaLabel=a.localization.resolve("REWIND")}S("shaka.ui.RewindButton",mL);function oL(){}oL.prototype.create=function(a,b){return new mL(a,b)};FI("rewind",new oL);function pL(a,b){hH.call(this,a,b);var c=this;this.j=this.controls.F;this.g=Xj();this.g.classList.add("shaka-save.video-frame-button");this.g.classList.add("shaka-tooltip");new iH(this.g,"M480-337q-8 0-15-2.5t-13-8.5L308-492q-12-12-11.5-28t11.5-28q12-12 28.5-12.5T365-549l75 75v-286q0-17 11.5-28.5T480-800q17 0 28.5 11.5T520-760v286l75-75q12-12 28.5-11.5T652-548q11 12 11.5 28T652-492L508-348q-6 6-13 8.5t-15 2.5ZM240-160q-33 0-56.5-23.5T160-240v-80q0-17 11.5-28.5T200-360q17 0 28.5 11.5T240-320v80h480v-80q0-17 11.5-28.5T760-360q17 0 28.5 11.5T800-320v80q0 33-23.5 56.5T720-160H240Z");
a=W("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.h=W("span");this.h.textContent=this.localization.resolve("DOWNLOAD_VIDEO_FRAME");a.appendChild(this.h);this.i=W("span");this.i.classList.add("shaka-current-selection-span");a.appendChild(this.i);this.g.appendChild(a);qL(this);this.parent.appendChild(this.g);this.eventManager.o(this.localization,"locale-updated",function(){qL(c)});this.eventManager.o(this.localization,"locale-changed",function(){qL(c)});
this.eventManager.o(this.g,"click",function(){var d=document.createElement("canvas"),e=d.getContext("2d"),f=c.controls.u;d.width=f.videoWidth;d.height=f.videoHeight;e.drawImage(f,0,0,d.width,d.height);d=d.toDataURL("image/png");e=document.createElement("a");e.href=d;e.download="videoframe_"+f.currentTime.toFixed(3)+".png";e.click()});this.eventManager.o(this.controls.D,"vrstatuschanged",function(){rL(c)});this.eventManager.o(this.adManager,"ad-started",function(){rL(c)});this.eventManager.o(this.adManager,
"ad-stopped",function(){rL(c)});this.eventManager.o(this.player,"unloading",function(){rL(c)});this.eventManager.o(this.player,"loaded",function(){rL(c)});this.eventManager.o(this.video,"play",function(){rL(c)});this.eventManager.o(this.video,"pause",function(){rL(c)});this.eventManager.o(this.video,"seeking",function(){rL(c)});this.eventManager.o(this.controls,"caststatuschanged",function(){rL(c)});rL(this)}ma(pL,hH);
function rL(a){var b=!0;a.controls.Zb()&&(b=!1);b&&a.j.Qa()&&(b=!1);b&&(a.player.drmInfo()||a.player.Md())&&(b=!1);b&&a.ad&&(b=!1);b&&a.video.remote&&a.video.remote.state!="disconnected"&&(b=!1);nH(a.g,b)}function qL(a){a.g.ariaLabel=a.localization.resolve("DOWNLOAD_VIDEO_FRAME");a.h.textContent=a.localization.resolve("DOWNLOAD_VIDEO_FRAME")}S("shaka.ui.SaveVideoFrameButton",pL);function sL(){}sL.prototype.create=function(a,b){return new pL(a,b)};kJ("save_video_frame",new sL);
sH("save_video_frame",new sL);function tL(a,b){hH.call(this,a,b);var c=this;if(this.g=this.player.xf())this.h=Xj(),this.h.classList.add("shaka-skip-next-button"),this.h.classList.add("shaka-tooltip"),(new iH(this.h)).use("M660-280v-400q0-17 11.5-28.5T700-720q17 0 28.5 11.5T740-680v400q0 17-11.5 28.5T700-240q-17 0-28.5-11.5T660-280Zm-440-35v-330q0-18 12-29t28-11q5 0 11 1t11 5l248 166q9 6 13.5 14.5T548-480q0 10-4.5 18.5T530-447L282-281q-5 4-11 5t-11 1q-16 0-28-11t-12-29Z"),this.parent.appendChild(this.h),uL(this),vL(this),this.eventManager.o(this.localization,
"locale-updated",function(){uL(c)}),this.eventManager.o(this.localization,"locale-changed",function(){uL(c)}),this.eventManager.o(this.h,"click",function(){c.controls.Ca()&&c.g.playItem(c.g.getCurrentItemIndex()+1)}),this.eventManager.o(this.g,"currentitemchanged",function(){vL(c)}),this.eventManager.o(this.g,"itemsinserted",function(){vL(c)}),this.eventManager.o(this.g,"itemsremoved",function(){vL(c)}),this.eventManager.o(this.player,"loading",function(){vL(c)})}ma(tL,hH);
function uL(a){a.h.ariaLabel=a.localization.resolve("SKIP_NEXT")}function vL(a){var b=a.g.getItems().length;b=b>1&&a.g.getCurrentItemIndex()+1<b;nH(a.h,b)}S("shaka.ui.SkipNextButton",tL);function wL(){}wL.prototype.create=function(a,b){return new tL(a,b)};FI("skip_next",new wL);function xL(a,b){hH.call(this,a,b);var c=this;if(this.g=this.player.xf())this.h=Xj(),this.h.classList.add("shaka-skip-previous-button"),this.h.classList.add("shaka-tooltip"),(new iH(this.h)).use("M220-280v-400q0-17 11.5-28.5T260-720q17 0 28.5 11.5T300-680v400q0 17-11.5 28.5T260-240q-17 0-28.5-11.5T220-280Zm458-1L430-447q-9-6-13.5-14.5T412-480q0-10 4.5-18.5T430-513l248-166q5-4 11-5t11-1q16 0 28 11t12 29v330q0 18-12 29t-28 11q-5 0-11-1t-11-5Z"),this.parent.appendChild(this.h),yL(this),zL(this),this.eventManager.o(this.localization,
"locale-updated",function(){yL(c)}),this.eventManager.o(this.localization,"locale-changed",function(){yL(c)}),this.eventManager.o(this.h,"click",function(){c.controls.Ca()&&c.g.playItem(c.g.getCurrentItemIndex()-1)}),this.eventManager.o(this.g,"currentitemchanged",function(){zL(c)}),this.eventManager.o(this.g,"itemsinserted",function(){zL(c)}),this.eventManager.o(this.g,"itemsremoved",function(){zL(c)}),this.eventManager.o(this.player,"loading",function(){zL(c)})}ma(xL,hH);
function yL(a){a.h.ariaLabel=a.localization.resolve("SKIP_PREVIOUS")}function zL(a){var b=a.g.getItems().length>1&&a.g.getCurrentItemIndex()>0;nH(a.h,b)}S("shaka.ui.SkipPreviousButton",xL);function AL(){}AL.prototype.create=function(a,b){return new xL(a,b)};FI("skip_previous",new AL);function BL(a,b){uH.call(this,a,b);this.button.classList.add("shaka-small-play-button");this.button.classList.add("shaka-tooltip")}ma(BL,uH);S("shaka.ui.SmallPlayButton",BL);function CL(){}CL.prototype.create=function(a,b){return new BL(a,b)};FI("play_pause",new CL);function DL(a,b){hH.call(this,a,b);a=W("div");a.classList.add("shaka-spacer");a.ariaHidden="true";this.parent.appendChild(a)}ma(DL,hH);S("shaka.ui.Spacer",DL);function EL(){}EL.prototype.create=function(a,b){return new DL(a,b)};FI("spacer",new EL);function FL(a,b){function c(m){m=parseInt(l.g[m],10);return m>2E9?(m/1E9).toFixed(2)+"GB":m>1E6?(m/1E6).toFixed(2)+"MB":m>1E3?(m/1E3).toFixed(2)+"KB":m+"B"}function d(m){return l.g[m]+" (gaps)"}function e(m){return oH(l.g[m],!1)+" (m)"}function f(m){return Math.round(l.g[m]/1E3)+" (kbits/s)"}function g(m){return l.g[m].toFixed(2)+" (s)"}function h(m){return l.g[m]+" (frames)"}function k(m){return l.g[m]+" (px)"}hH.call(this,a,b);var l=this;this.i=Xj();this.i.classList.add("shaka-statistics-button");
this.u=new iH(this.i,"M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Zm0-80h560v-560H200v560Zm0-560v560-560Zm120 200q-17 0-28.5 11.5T280-520v200q0 17 11.5 28.5T320-280q17 0 28.5-11.5T360-320v-200q0-17-11.5-28.5T320-560Zm160-120q-17 0-28.5 11.5T440-640v320q0 17 11.5 28.5T480-280q17 0 28.5-11.5T520-320v-320q0-17-11.5-28.5T480-680Zm160 240q-17 0-28.5 11.5T600-400v80q0 17 11.5 28.5T640-280q17 0 28.5-11.5T680-320v-80q0-17-11.5-28.5T640-440Z");
a=W("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-simple-overflow-button-label-inline");this.A=W("span");a.appendChild(this.A);this.l=W("span");this.l.classList.add("shaka-current-selection-span");a.appendChild(this.l);this.i.appendChild(a);this.parent.appendChild(this.i);this.h=W("div");this.h.classList.add("shaka-no-propagation");this.h.classList.add("shaka-show-controls-on-mouse-over");this.h.classList.add("shaka-statistics-container");this.h.classList.add("shaka-hidden");
this.controls.i.appendChild(this.h);this.D=[];this.F=["stateHistory","switchHistory"];this.g=this.player.getStats();this.m=new Map;this.C=(new Map).set("width",k).set("height",k).set("currentCodecs",function(m){return l.g[m]}).set("completionPercent",function(m){return l.g[m]+" (%)"}).set("bufferingTime",g).set("drmTimeSeconds",g).set("licenseTime",g).set("liveLatency",g).set("loadLatency",g).set("manifestTimeSeconds",g).set("estimatedBandwidth",f).set("streamBandwidth",f).set("maxSegmentDuration",
g).set("pauseTime",e).set("playTime",e).set("corruptedFrames",h).set("decodedFrames",h).set("droppedFrames",h).set("stallsDetected",function(m){return l.g[m]+" (stalls)"}).set("gapsJumped",d).set("manifestSizeBytes",c).set("bytesDownloaded",c).set("nonFatalErrorCount",function(m){return l.g[m]+" (errors)"}).set("manifestPeriodCount",function(m){return l.g[m]+" (periods)"}).set("manifestGapCount",d);this.j=new Gf(function(){l.g=l.player.getStats();for(var m=u(l.D),n=m.next();!n.done;n=m.next()){var q=
n.value;n=l.m.get(q);n.textContent=l.C.get(q)(q);n&&n.parentElement&&(q=l.g[q],typeof q=="string"?nH(n.parentElement,q!=""):nH(n.parentElement,!isNaN(q)))}});GL(this);HL(this);this.eventManager.o(this.localization,"locale-updated",function(){GL(l)});this.eventManager.o(this.localization,"locale-changed",function(){GL(l)});this.eventManager.o(this.i,"click",function(){IL(l);GL(l)})}ma(FL,hH);
function IL(a){a.h.classList.contains("shaka-hidden")?(a.u.use("M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Zm120-440q-17 0-28.5 11.5T280-520v200q0 17 11.5 28.5T320-280q17 0 28.5-11.5T360-320v-200q0-17-11.5-28.5T320-560Zm160-120q-17 0-28.5 11.5T440-640v320q0 17 11.5 28.5T480-280q17 0 28.5-11.5T520-320v-320q0-17-11.5-28.5T480-680Zm160 240q-17 0-28.5 11.5T600-400v80q0 17 11.5 28.5T640-280q17 0 28.5-11.5T680-320v-80q0-17-11.5-28.5T640-440Z"),a.j.xa(.1),
nH(a.h,!0)):(a.u.use("M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Zm0-80h560v-560H200v560Zm0-560v560-560Zm120 200q-17 0-28.5 11.5T280-520v200q0 17 11.5 28.5T320-280q17 0 28.5-11.5T360-320v-200q0-17-11.5-28.5T320-560Zm160-120q-17 0-28.5 11.5T440-640v320q0 17 11.5 28.5T480-280q17 0 28.5-11.5T520-320v-320q0-17-11.5-28.5T480-680Zm160 240q-17 0-28.5 11.5T600-400v80q0 17 11.5 28.5T640-280q17 0 28.5-11.5T680-320v-80q0-17-11.5-28.5T640-440Z"),
a.j.stop(),nH(a.h,!1))}function GL(a){a.A.textContent=a.localization.resolve("STATISTICS");a.i.ariaLabel=a.localization.resolve("STATISTICS");a.l.textContent=a.localization.resolve(a.h.classList.contains("shaka-hidden")?"OFF":"ON")}function JL(a,b){var c=W("div"),d=W("label");d.textContent=b+":";c.appendChild(d);d=W("span");d.textContent=a.C.get(b)(b);c.appendChild(d);a.m.set(b,d);return c}
function HL(a){var b=W("div");b.classList.add("shaka-no-propagation");b.classList.add("shaka-statistics-close");var c=(new iH(b,"M480-424 284-228q-11 11-28 11t-28-11q-11-11-11-28t11-28l196-196-196-196q-11-11-11-28t11-28q11-11 28-11t28 11l196 196 196-196q11-11 28-11t28 11q11 11 11 28t-11 28L536-480l196 196q11 11 11 28t-11 28q-11 11-28 11t-28-11L480-424Z")).g;c.classList.add("material-icons","notranslate");a.h.appendChild(b);a.eventManager.o(c,"click",function(){IL(a)});b=u(a.controls.g.statisticsList);
for(c=b.next();!c.done;c=b.next())if(c=c.value,c in a.g&&!a.F.includes(c)){var d=JL(a,c);a.h.appendChild(d);a.D.push(c)}else bb("Unrecognized statistic element:",c)}FL.prototype.release=function(){this.j.stop();this.j=null;hH.prototype.release.call(this)};S("shaka.ui.StatisticsButton",FL);function KL(){}KL.prototype.create=function(a,b){return new FL(a,b)};kJ("statistics",new KL);sH("statistics",new KL);function LL(a,b){OJ.call(this,a,b,"M200-160q-33 0-56.5-23.5T120-240v-480q0-33 23.5-56.5T200-800h560q33 0 56.5 23.5T840-720v480q0 33-23.5 56.5T760-160H200Zm80-200h120q17 0 28.5-11.5T440-400v-20q0-9-6-15t-15-6h-18q-9 0-15 6t-6 15h-80v-120h80q0 9 6 15t15 6h18q9 0 15-6t6-15v-20q0-17-11.5-28.5T400-600H280q-17 0-28.5 11.5T240-560v160q0 17 11.5 28.5T280-360Zm400-240H560q-17 0-28.5 11.5T520-560v160q0 17 11.5 28.5T560-360h120q17 0 28.5-11.5T720-400v-20q0-9-6-15t-15-6h-18q-9 0-15 6t-6 15h-80v-120h80q0 9 6 15t15 6h18q9 0 15-6t6-15v-20q0-17-11.5-28.5T680-600Z");
var c=this;this.button.classList.add("shaka-caption-button");this.button.classList.add("shaka-tooltip-status");this.menu.classList.add("shaka-text-languages");this.player&&this.player.Yc()?this.button.ariaPressed="true":this.button.ariaPressed="false";ML(this);this.eventManager.o(this.localization,"locale-updated",function(){NL(c);OL(c)});this.eventManager.o(this.localization,"locale-changed",function(){NL(c);OL(c)});this.eventManager.o(this.player,"loading",function(){PL(c);OL(c)});this.eventManager.o(this.player,
"loaded",function(){PL(c);OL(c)});this.eventManager.o(this.player,"unloading",function(){PL(c);OL(c)});this.eventManager.o(this.player,"texttrackvisibility",function(){PL(c);OL(c)});this.eventManager.o(this.player,"textchanged",function(){OL(c)});this.eventManager.o(this.player,"trackschanged",function(){OL(c)});PL(this);NL(this);OL(this)}ma(LL,OJ);function ML(a){var b=Xj();b.ariaSelected="true";a.menu.appendChild(b);b.appendChild(mH());a.g=W("span");b.appendChild(a.g)}
function PL(a){a.player.Yc()?(a.icon.use("M200-160q-33 0-56.5-23.5T120-240v-480q0-33 23.5-56.5T200-800h560q33 0 56.5 23.5T840-720v480q0 33-23.5 56.5T760-160H200Zm80-200h120q17 0 28.5-11.5T440-400v-20q0-9-6-15t-15-6h-18q-9 0-15 6t-6 15h-80v-120h80q0 9 6 15t15 6h18q9 0 15-6t6-15v-20q0-17-11.5-28.5T400-600H280q-17 0-28.5 11.5T240-560v160q0 17 11.5 28.5T280-360Zm400-240H560q-17 0-28.5 11.5T520-560v160q0 17 11.5 28.5T560-360h120q17 0 28.5-11.5T720-400v-20q0-9-6-15t-15-6h-18q-9 0-15 6t-6 15h-80v-120h80q0 9 6 15t15 6h18q9 0 15-6t6-15v-20q0-17-11.5-28.5T680-600Z"),
a.button.ariaPressed="true"):(a.icon.use("M791-57 687-160H200q-33 0-56.5-23.5T120-240v-487l-65-65q-12-12-12-28.5T55-849q12-12 28.5-12t28.5 12l736 736q12 12 12 28t-12 28q-12 12-28.5 12T791-57ZM280-360h120q17 0 28.5-11.5T440-400v-25q0-8-6-14t-14-6h-20q-8 0-14 6t-6 14v5h-80v-127l-45-45v1q-7 5-11 13t-4 18v160q0 17 11.5 28.5T280-360Zm560-360v388q0 27-24.5 37.5T772-303l-66-66q7-5 10.5-13.5T720-400v-20q0-8-6-14t-14-6h-20q-8 0-14 6t-6 14h-5l-75-75v-45h80v5q0 8 6 14t14 6h20q8 0 14-6t6-14v-25q0-17-11.5-28.5T680-600H560q-17 0-28.5 11.5T520-560v5L343-732q-19-19-8.5-43.5T372-800h388q33 0 56.5 23.5T840-720Z"),
a.button.ariaPressed="false");a.controls.dispatchEvent(new T("captionselectionupdated"))}
function OL(a){var b=a.player.Bc()||[];NJ(b,a.menu,function(d){return QL(a,d)},a.player.Yc(),a.currentSelection,a.localization,a.controls.g.textTrackLabelFormat);var c=Xj();c.classList.add("shaka-turn-captions-off-button");a.eventManager.o(c,"click",function(){a.player.$d(!1);OL(a)});c.appendChild(a.g);a.menu.appendChild(c);a.player.Yc()?a.g.classList.remove("shaka-chosen-item"):(c.ariaSelected="true",c.appendChild(mH()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("OFF"));
a.button.setAttribute("shaka-status",a.currentSelection.textContent);lH(a.menu);a.controls.dispatchEvent(new T("captionselectionupdated"));nH(a.button,b.length>0)}function QL(a,b){return Q(function(c){if(c.g==1)return a.player.hg(b),E(c,a.player.$d(!0),2);a.player.configure({preferredTextLanguage:b.language,preferForcedSubs:b.forced});H(c)})}
function NL(a){a.button.ariaLabel=a.localization.resolve("CAPTIONS");a.backButton.ariaLabel=a.localization.resolve("BACK");a.nameSpan.textContent=a.localization.resolve("CAPTIONS");a.backSpan.textContent=a.localization.resolve("CAPTIONS");a.g.textContent=a.localization.resolve("OFF")}S("shaka.ui.TextSelection",LL);function RL(){}RL.prototype.create=function(a,b){return new LL(a,b)};kJ("captions",new RL);FI("captions",new RL);function SL(a,b){hH.call(this,a,b);var c=this;this.g=Xj();this.g.classList.add("shaka-toggle-stereoscopic-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";new iH(this.g,"M620-360H520q-8 0-14-6t-6-14v-200q0-8 6-14t14-6h100q17 0 28.5 11.5T660-560v160q0 17-11.5 28.5T620-360Zm-200 0h-90q-13 0-21.5-8.5T300-390q0-13 8.5-21.5T330-420h70v-40h-40q-8 0-14-6t-6-14q0-8 6-14t14-6h40v-40h-70q-13 0-21.5-8.5T300-570q0-13 8.5-21.5T330-600h90q17 0 28.5 11.5T460-560v160q0 17-11.5 28.5T420-360Zm140-60h40v-120h-40v120Zm280-20q-17 0-28.5-11.5T800-480q0-115-72.5-203T542-794l30 30q11 11 11 28t-11 28q-11 11-28 11t-28-11L387-837q-8-8-4.5-20t14.5-15q20-5 41-6.5t42-1.5q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 17-11.5 28.5T840-440ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-17 11.5-28.5T120-520q17 0 28.5 11.5T160-480q0 115 72.5 203T418-166l-30-30q-11-11-11-28t11-28q11-11 28-11t28 11l129 129q8 8 4.5 20T563-88q-20 5-41 6.5T480-80Z");
a=W("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.i=W("span");a.appendChild(this.i);this.h=W("span");this.h.classList.add("shaka-current-selection-span");a.appendChild(this.h);this.g.appendChild(a);this.parent.appendChild(this.g);TL(this);this.eventManager.o(this.localization,"locale-updated",function(){TL(c)});this.eventManager.o(this.localization,"locale-changed",function(){TL(c)});var d=this.controls.D;this.eventManager.o(this.g,"click",
function(){c.controls.Ca()&&d.ae()});this.eventManager.o(d,"vrstatuschanged",function(){nH(c.g,c.controls.Zb())});nH(this.g,this.controls.Zb())}ma(SL,hH);function TL(a){a.g.ariaLabel=a.localization.resolve("TOGGLE_STEREOSCOPIC");a.i.textContent=a.localization.resolve("TOGGLE_STEREOSCOPIC")}S("shaka.ui.ToggleStereoscopicButton",SL);function UL(){}UL.prototype.create=function(a,b){return new SL(a,b)};kJ("toggle_stereoscopic",new UL);FI("toggle_stereoscopic",new UL);function VL(a,b){CH.call(this,a,b,["shaka-volume-bar-container"],["shaka-volume-bar"]);var c=this;this.g=this.controls.g;this.g.alwaysShowVolumeBar||this.container.classList.add("shaka-volume-bar-container-allow-hiding");this.setRange(0,100);this.eventManager.o(this.video,"volumechange",function(){return WL(c)});this.eventManager.o(this.player,"loading",function(){return WL(c)});this.eventManager.o(this.player,"loaded",function(){return XL(c)});this.eventManager.o(this.player,"unloading",function(){return XL(c)});
this.eventManager.o(this.player,"trackschanged",function(){return XL(c)});this.eventManager.o(this.controls,"caststatuschanged",function(){return WL(c)});this.eventManager.o(this.adManager,"ad-volume-changed",function(){return YL(c)});this.eventManager.o(this.adManager,"ad-muted",function(){return YL(c)});this.eventManager.o(this.adManager,"ad-started",function(){return XL(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){XL(c);WL(c)});this.eventManager.o(this.localization,"locale-updated",
function(){return ZL(c)});this.eventManager.o(this.localization,"locale-changed",function(){return ZL(c)});WL(this);ZL(this);if(this.ad)this.onChange();XL(this)}ma(VL,CH);VL.prototype.onChange=function(){this.ad&&this.ad.isLinear()?this.ad.setVolume(this.getValue()/100):(this.video.volume=this.getValue()/100,this.video.volume>0&&(this.video.muted=!1))};function WL(a){a.video.muted?a.setValue(0):a.setValue(a.video.volume*100);$L(a)}function YL(a){var b=a.ad.getVolume();a.setValue(b*100);$L(a)}
function $L(a){var b=a.g.volumeBarColors,c=["to right"];c.push(b.level+a.getValue()+"%");c.push(b.base+a.getValue()+"%");c.push(b.base+"100%");a.container.style.background="linear-gradient("+c.join(",")+")"}function ZL(a){a.bar.ariaLabel=a.localization.resolve("VOLUME")}function XL(a){var b=!0;a.ad&&a.ad.isLinear()?b=!0:a.player.Hf()&&(b=!1);nH(a.container,b)}S("shaka.ui.VolumeBar",VL);function aM(){}aM.prototype.create=function(a,b){return new VL(a,b)};FI("volume",new aM);}).call(exportTo,innerGlobal,innerGlobal,undefined);if(typeof exports!="undefined")for(var k in exportTo.shaka)exports[k]=exportTo.shaka[k];else if(typeof define=="function"&&define.amd)define(function(){return exportTo.shaka});else innerGlobal.shaka=exportTo.shaka})();

//# sourceMappingURL=shaka-player.ui.map